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

Strip code for DS_WARN_ON_UNKNOWN_KEYS warning in production #4222

Merged
merged 1 commit into from
Mar 9, 2016
Merged

Strip code for DS_WARN_ON_UNKNOWN_KEYS warning in production #4222

merged 1 commit into from
Mar 9, 2016

Conversation

pangratz
Copy link
Member

@pangratz pangratz commented Mar 8, 2016

  • wrap code inside runInDebug so it is stripped from production
  • update checks so they work correctly with passed payload, which is
    actually a JSON-API document

- wrap code inside runInDebug so it is stripped from production
- update checks so they work correctly with passed payload, which is
  actually a JSON-API document
}
runInDebug(() => {
// If Ember.ENV.DS_WARN_ON_UNKNOWN_KEYS is set to true and the payload
// contains unknown attributes or relationships, log a warning.
Copy link
Member

Choose a reason for hiding this comment

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

Fun fact: All the code inside runInDebug get striped but this comment is preserved.

Copy link
Member Author

Choose a reason for hiding this comment

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

😜

@bmac
Copy link
Member

bmac commented Mar 9, 2016

Thanks @pangratz

bmac added a commit that referenced this pull request Mar 9, 2016
Strip code for DS_WARN_ON_UNKNOWN_KEYS warning in production
@bmac bmac merged commit e8283f7 into emberjs:master Mar 9, 2016
@pangratz pangratz deleted the refactor-warn-on-unknown-keys branch March 9, 2016 14:56
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.

None yet

2 participants