fix(cli): failed to sync route (#8498)
This commit is contained in:
@@ -1,20 +1,3 @@
|
||||
function iframeReady(iframe, callback) {
|
||||
const doc = iframe.contentDocument || iframe.contentWindow.document;
|
||||
const interval = () => {
|
||||
if (iframe.contentWindow.replacePath) {
|
||||
callback();
|
||||
} else {
|
||||
setTimeout(interval, 50);
|
||||
}
|
||||
};
|
||||
|
||||
if (doc.readyState === 'complete') {
|
||||
interval();
|
||||
} else {
|
||||
iframe.onload = interval;
|
||||
}
|
||||
}
|
||||
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
const isMobile = /ios|iphone|ipod|ipad|android/.test(ua);
|
||||
|
||||
@@ -25,4 +8,4 @@ export function decamelize(str, sep = '-') {
|
||||
.toLowerCase();
|
||||
}
|
||||
|
||||
export { isMobile, iframeReady };
|
||||
export { isMobile };
|
||||
|
||||
Reference in New Issue
Block a user