fix(elements): strict null checks (#24861)

PR Close #24861
This commit is contained in:
Rob Wormald 2018-08-27 23:28:20 -07:00 committed by Misko Hevery
parent c9844a2f01
commit a8210d010b
1 changed files with 3 additions and 3 deletions

View File

@ -3,11 +3,11 @@ import {AppModuleNgFactory} from './app.ngfactory';
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory, {ngZone: 'noop'}); 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]'); const input = document.querySelector('input[type=text]');
if(input){ if(input && helloWorld){
input.addEventListener('input', e => { input.addEventListener('input', e => {
const newText = (e.target as any).value; const newText = (e.target as any).value;
helloWorldEl.setAttribute('name', newText); helloWorld.setAttribute('name', newText);
}); });
} }