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

[CLEANUP beta] Fix ember-2-legacy support for Ember.Binding. #16095

Merged
merged 1 commit into from
Jan 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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