Skip to content

Commit

Permalink
Inline ember metal stuff to make Embroider happy
Browse files Browse the repository at this point in the history
  • Loading branch information
zeppelin committed Oct 19, 2022
1 parent 3767e41 commit e71c3ac
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions addon/-private/ember-internals.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
import __EMBER_METAL__ from '@ember/-internals/metal/index';

export function getDependentKeys(descriptorOrDecorator) {
if (__EMBER_METAL__ && __EMBER_METAL__.descriptorForDecorator) {
let descriptor = __EMBER_METAL__.descriptorForDecorator(
descriptorOrDecorator
);
return descriptor._dependentKeys || [descriptor.altKey];
} else {
return descriptorOrDecorator._dependentKeys;
}
return descriptorOrDecorator._dependentKeys;
}

export function isDescriptor(o) {
if (__EMBER_METAL__ && __EMBER_METAL__.isClassicDecorator) {
return __EMBER_METAL__.isClassicDecorator(o);
} else {
return (
o && (typeof o === 'object' || typeof o === 'function') && o.isDescriptor
);
}
return (
o && (typeof o === 'object' || typeof o === 'function') && o.isDescriptor
);
}

0 comments on commit e71c3ac

Please sign in to comment.