From a6087d4fcdf61688765e5303c2165234d56533db Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 7 Jan 2016 10:53:02 +0100 Subject: [PATCH] [deprecations] Use Component#_state instead of Component#state --- app/components/log-content.js | 2 +- config/deprecation-workflow.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/components/log-content.js b/app/components/log-content.js index 0c0f58f5..b21cfe6c 100644 --- a/app/components/log-content.js +++ b/app/components/log-content.js @@ -158,7 +158,7 @@ export default Ember.Component.extend({ if (Log.DEBUG) { console.log('log view: parts did change'); } - if (this.get('state') !== 'inDOM') { + if (this.get('_state') !== 'inDOM') { return; } ref = parts.slice(start, start + added); diff --git a/config/deprecation-workflow.js b/config/deprecation-workflow.js index 829f563b..6758ed1b 100644 --- a/config/deprecation-workflow.js +++ b/config/deprecation-workflow.js @@ -6,11 +6,14 @@ window.deprecationWorkflow.config = { { handler: "log", matchMessage: "Calling store.find() with a query object is deprecated. Use store.query() instead." }, { handler: "log", matchMessage: new RegExp("A property of .*? was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation.") }, { handler: "log", matchMessage: "Ember.arrayComputed is deprecated. Replace it with plain array methods" }, + // this will still emit deprecations, because we use state property in + // request-icon compoenent, that makes Ember.js think that we're using + // internal component's state + { handler: "log", matchMessage: "Usage of `state` is deprecated, use `_state` instead." }, // TODO { handler: "silence", matchMessage: "Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy." }, { handler: "silence", matchMessage: "The filter API will be moved into a plugin soon. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page" }, - { handler: "silence", matchMessage: "Usage of `state` is deprecated, use `_state` instead." }, { handler: "silence", matchMessage: "Function#observesBefore is deprecated and will be removed in the near future." }, { handler: "silence", matchMessage: "Ember.addBeforeObserver is deprecated and will be removed in the near future." }, { handler: "silence", matchMessage: "`Ember.ArrayController` is deprecated." },