From a8210d010be8ff054859d3e1a6e9fd00c2a6bd64 Mon Sep 17 00:00:00 2001 From: Rob Wormald Date: Mon, 27 Aug 2018 23:28:20 -0700 Subject: [PATCH] fix(elements): strict null checks (#24861) PR Close #24861 --- integration/ng_elements/src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration/ng_elements/src/main.ts b/integration/ng_elements/src/main.ts index 278468e3c0..545db04a1f 100644 --- a/integration/ng_elements/src/main.ts +++ b/integration/ng_elements/src/main.ts @@ -3,11 +3,11 @@ import {AppModuleNgFactory} from './app.ngfactory'; platformBrowser().bootstrapModuleFactory(AppModuleNgFactory, {ngZone: 'noop'}); -const helloWorldEl = document.querySelector('hello-world-el'); +const helloWorld = document.querySelector('hello-world-el'); const input = document.querySelector('input[type=text]'); -if(input){ +if(input && helloWorld){ input.addEventListener('input', e => { const newText = (e.target as any).value; - helloWorldEl.setAttribute('name', newText); + helloWorld.setAttribute('name', newText); }); }