Skip to content

Commit 9661a90

Browse files
appzukaSepand Parhami
authored and
Sepand Parhami
committed
Added Node | ChildNode type to avoid errors caused by update to Types… (#385)
1 parent aaa06de commit 9661a90

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CONTRIBUTORS

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Sepand Parhami <[email protected]>
55
Justin Ridgewell <[email protected]>
66
Markus Kobler <[email protected]>
77
Jader Tao <[email protected]>
8+
Nick Excell <[email protected]>

src/node_data.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function importSingleNode(node: Node, fallbackKey?: Key) {
120120
function importNode(node: Node) {
121121
importSingleNode(node);
122122

123-
for (let child = node.firstChild; child; child = child.nextSibling) {
123+
for (let child: Node|null = node.firstChild; child; child = child.nextSibling) {
124124
importNode(child);
125125
}
126126
}
@@ -131,12 +131,11 @@ function importNode(node: Node) {
131131
function clearCache(node: Node) {
132132
node['__incrementalDOMData'] = null;
133133

134-
for (let child = node.firstChild; child; child = child.nextSibling) {
134+
for (let child: Node|null = node.firstChild; child; child = child.nextSibling) {
135135
clearCache(child);
136136
}
137137
}
138138

139-
140139
/**
141140
* Records the element's attributes.
142141
* @param node The Element that may have attributes

0 commit comments

Comments
 (0)