Skip to content

Commit

Permalink
Add missing babel helper
Browse files Browse the repository at this point in the history
This is needed due to https://github.com/glimmerjs/glimmer-vm/blob/e672233ea70ab2614648bb194efc107f3698baad/packages/%40glimmer/runtime/lib/compiled/opcodes/component.ts

This is probably unintended and a waste of bytes. We should fix it
upstream and remove this helper.

(cherry picked from commit fd360ca)
  • Loading branch information
chancancode committed Apr 9, 2019
1 parent da2307a commit ede5d4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/external-helpers/lib/external-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ export function possibleConstructorReturn(self, call) {
}
return assertThisInitialized(self);
}

export function objectDestructuringEmpty(obj) {
if (DEBUG && (obj === null || obj === undefined)) {
throw new TypeError('Cannot destructure undefined');
}
}

0 comments on commit ede5d4b

Please sign in to comment.