From fd360ca8181f0812a20fd718fefcfb0ddd4befe7 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 29 Mar 2019 23:18:21 -0700 Subject: [PATCH] Add missing babel helper 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. --- packages/external-helpers/lib/external-helpers.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/external-helpers/lib/external-helpers.js b/packages/external-helpers/lib/external-helpers.js index 55150bfbe12..918f73a475d 100644 --- a/packages/external-helpers/lib/external-helpers.js +++ b/packages/external-helpers/lib/external-helpers.js @@ -111,3 +111,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'); + } +}