Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(formats): fix max call stack issue on json/nested format #465

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

dbanksdesign
Copy link
Member

Issue #, if available: #464

Description of changes: Fixing max call stack on json/nested format when the dictionary object contains non-token data. The issue was we were using for (var name in obj) assuming obj was an object, but if it was a string it would get in an infinite loop.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -784,14 +789,14 @@ module.exports = {
* @example
* ```dart
* import 'package:flutter/material.dart';
*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

* class StyleDictionary {
* StyleDictionary._();
*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

* static const colorBrandPrimary = Color(0x00ff5fff);
* static const sizeFontSizeMedium = 16.00;
* static const contentFontFamily1 = "NewJune";
* ```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@chazzmoney
Copy link
Collaborator

LGTM - and you made some whitespace modifications. I'm totally good merging as is, but wanted to make sure you saw them.

:shipit:

@dbanksdesign
Copy link
Member Author

I did not see those whitespace changes... thanks for bringing them up. Let me double check them, maybe it was prettier doing something...

@dbanksdesign
Copy link
Member Author

Ah I have the prettier plugin on VSCode and it was removing trailing whitespace. So it's a change we probably should make, but we should also probably have prettier as a dev dependency and have it run as a pre-commit hook or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants