From 8e2d6f6a507fee1b76a6e46abdf0095a54a653e4 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Tue, 24 Apr 2018 14:40:29 -0500 Subject: [PATCH] update targetObject to target to fix deprecation notice --- addon/mixins/spread.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addon/mixins/spread.js b/addon/mixins/spread.js index 8a1ceb8..3e95684 100644 --- a/addon/mixins/spread.js +++ b/addon/mixins/spread.js @@ -57,13 +57,13 @@ export default Mixin.create({ if (isNone(spreadListeners)) { get(sourceObject, sourceProperty).set('_spreadListeners', [ { - targetObject: this, + target: this, targetProperty: spreadProperty } ]) } else { spreadListeners.push({ - targetObject: this, + target: this, targetProperty: spreadProperty }) } @@ -79,9 +79,9 @@ export default Mixin.create({ // spread the new property onto the target object this._spreadListeners.forEach(listener => { if (typeOf(value) === 'function') { - listener.targetObject.set(key, value) + listener.target.set(key, value) } else { - defineProperty(listener.targetObject, key, + defineProperty(listener.target, key, computed.readOnly(`${listener.targetProperty}.${key}`) ) } @@ -185,7 +185,7 @@ export default Mixin.create({ * @returns {boolean} - true if the given listener came from this object */ _isLocalListener (listener) { - return listener.targetObject === this + return listener.target === this }, // == Ember Lifecycle Hooks =================================================