Skip to content

Commit cf0374a

Browse files
authored
fix(Spectacles): Sometimes fails on page load
1 parent e89ed80 commit cf0374a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Spectacles/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ function grabSourceFromImage(blurredSrc, externalSrc) {
193193

194194
// Looping through to grab source
195195
let curNode = tmpTreeWalker.currentNode;
196-
while (curNode) {
197-
curNode = tmpTreeWalker.nextNode();
196+
while (tmpTreeWalker.nextNode()) {
197+
curNode = tmpTreeWalker.currentNode;
198198

199199
// Getting image
200200
const children = curNode.childNodes;
@@ -287,4 +287,4 @@ VM.observe(rootNode, (mutList) => {
287287
if (!x) return false;
288288
removePostSpoiler(x, postType)
289289
});
290-
}, { childList: true });
290+
}, { childList: true });

0 commit comments

Comments
 (0)