-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: show spinner till content isnt visible #210
Conversation
const hasText = !!targetNode.innerText.trim().length | ||
const hasOpticNodes = !!targetNode.querySelector(':not(div):not(span)'); | ||
if (!hasText && !hasOpticNodes) return; | ||
if (Object.values(status).some(n => !n)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use if with brackets pls
const hasText = !!targetNode.innerText.trim().length | ||
const hasOpticNodes = !!targetNode.querySelector(':not(div):not(span)'); | ||
if (!hasText && !hasOpticNodes) return; | ||
if (Object.values(status).some(n => !n)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found myself thinking that we probably do not have any polyfill for Object.values, so this would not work in IE11
So I suggest to test it in IE11 and change this by using supported methods or add polyfill for that if we still support IE11
|
||
// if we have rendered MS to DOM but temporary hide it for some reason, e.g. to fetch data | ||
if (!status.isAnyChildVisible) { | ||
status.isAnyChildVisible = Array.from(targetNode.children).some(node => node.style.display !== 'none'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IE11 does not support Array.from
No description provided.