Skip to content

Commit a8210d0

Browse files
robwormaldmhevery
authored andcommitted
fix(elements): strict null checks (#24861)
PR Close #24861
1 parent c9844a2 commit a8210d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

integration/ng_elements/src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {AppModuleNgFactory} from './app.ngfactory';
33

44
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory, {ngZone: 'noop'});
55

6-
const helloWorldEl = document.querySelector('hello-world-el');
6+
const helloWorld = document.querySelector('hello-world-el');
77
const input = document.querySelector('input[type=text]');
8-
if(input){
8+
if(input && helloWorld){
99
input.addEventListener('input', e => {
1010
const newText = (e.target as any).value;
11-
helloWorldEl.setAttribute('name', newText);
11+
helloWorld.setAttribute('name', newText);
1212
});
1313
}

0 commit comments

Comments
 (0)