Skip to content

Commit

Permalink
fix isElementDescriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Garrett committed Mar 3, 2019
1 parent 98facb1 commit 479a5d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@ember/-internals/metal/lib/decorator.ts
Expand Up @@ -22,8 +22,9 @@ export function isElementDescriptor(
return (
// Ensure we have the right number of args
args.length === 3 &&
// Make sure the target is an object
(typeof maybeTarget === 'object' && maybeTarget !== null) &&
// Make sure the target is a class or object (prototype)
(typeof maybeTarget === 'function' ||
(typeof maybeTarget === 'object' && maybeTarget !== null)) &&
// Make sure the key is a string
typeof maybeKey === 'string' &&
// Make sure the descriptor is the right shape
Expand Down

0 comments on commit 479a5d4

Please sign in to comment.