From 121b8a1a0c0c27ab530145811128e2d5c6803d74 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Nov 2017 10:06:57 -0500 Subject: [PATCH] remove unreachable code --- src/generators/dom/visitors/Element/meta/Window.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/generators/dom/visitors/Element/meta/Window.ts b/src/generators/dom/visitors/Element/meta/Window.ts index 90bfff55c4..f5cfb23e80 100644 --- a/src/generators/dom/visitors/Element/meta/Window.ts +++ b/src/generators/dom/visitors/Element/meta/Window.ts @@ -83,10 +83,6 @@ export default function visitWindow( const associatedEvent = associatedEvents[attribute.name]; - if (!associatedEvent) { - throw new Error(`Cannot bind to ${attribute.name} on <:Window>`); - } - if (!events[associatedEvent]) events[associatedEvent] = []; events[associatedEvent].push( `${attribute.value.name}: this.${attribute.name}`