Skip to content

Commit

Permalink
Merge pull request #16095 from rwjblue/binding-cleanup
Browse files Browse the repository at this point in the history
[CLEANUP beta] Fix ember-2-legacy support for Ember.Binding.
  • Loading branch information
rwjblue authored Jan 9, 2018
2 parents 0ef4488 + 634924c commit 629c5a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/ember-metal/lib/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ function applyMixin(obj, mixins, partial) {
replaceObserversAndListeners(obj, key, obj[key], value);
}

if (ENV._ENABLE_BINDING_SUPPORT && Mixin.detectBinding(key)) {
if (ENV._ENABLE_BINDING_SUPPORT && typeof Mixin.detectBinding === 'function' && Mixin.detectBinding(key)) {
meta.writeBindings(key, value);
}

defineProperty(obj, key, desc, value, meta);
}

if (ENV._ENABLE_BINDING_SUPPORT && !partial) { // don't apply to prototype
if (ENV._ENABLE_BINDING_SUPPORT && !partial && typeof Mixin.finishProtype === 'function') {
Mixin.finishPartial(obj, meta);
}

Expand Down
7 changes: 0 additions & 7 deletions packages/ember-runtime/lib/system/core_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
Mixin,
REQUIRED,
defineProperty,
Binding,
ComputedProperty,
computed,
InjectedProperty,
Expand Down Expand Up @@ -495,12 +494,6 @@ CoreObject.PrototypeMixin = Mixin.create({
m.setSourceDestroyed();
},

bind(to, from) {
if (!(from instanceof Binding)) { from = Binding.from(from); }
from.to(to).connect(this);
return from;
},

/**
Returns a string representation which attempts to provide more information
than Javascript's `toString` typically does, in a generic way for all Ember
Expand Down

0 comments on commit 629c5a8

Please sign in to comment.