Skip to content

Commit f19f186

Browse files
authored
Merge pull request #16336 from bekzod/cleanup-mixin
cleanup `Mixin` methods
2 parents 449e9fa + 7f68da4 commit f19f186

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/ember-metal/lib/mixin.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,10 @@ export default class Mixin {
465465
}
466466
}
467467

468+
static _apply() {
469+
return applyMixin(...arguments);
470+
}
471+
468472
static applyPartial(obj, ...args) {
469473
return applyMixin(obj, args, true);
470474
}
@@ -573,23 +577,21 @@ export default class Mixin {
573577
return _keys(this);
574578
}
575579

580+
toString() {
581+
return '(unknown mixin)';
582+
}
583+
576584
}
577585

578-
Mixin._apply = applyMixin;
579586
if (ENV._ENABLE_BINDING_SUPPORT) {
580587
// slotting this so that the legacy addon can add the function here
581588
// without triggering an error due to the Object.seal done below
582589
Mixin.finishPartial = null;
583590
Mixin.detectBinding = null;
584591
}
585592

586-
let MixinPrototype = Mixin.prototype;
587-
MixinPrototype.toString = function Mixin_toString() {
588-
return '(unknown mixin)';
589-
};
590-
591593
if (DEBUG) {
592-
Object.seal(MixinPrototype);
594+
Object.seal(Mixin.prototype);
593595
}
594596

595597
let unprocessedFlag = false;

0 commit comments

Comments
 (0)