mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-19 18:42:34 +00:00
Fix SCRIPT1028 caused by async (#852)
This commit is contained in:
parent
77adbf59d8
commit
da4712e78d
@ -449,7 +449,6 @@ NexT.utils = {
|
|||||||
condition = false,
|
condition = false,
|
||||||
attributes: {
|
attributes: {
|
||||||
id = '',
|
id = '',
|
||||||
async = false,
|
|
||||||
defer = false,
|
defer = false,
|
||||||
crossOrigin = '',
|
crossOrigin = '',
|
||||||
dataset = {},
|
dataset = {},
|
||||||
@ -457,6 +456,7 @@ NexT.utils = {
|
|||||||
} = {},
|
} = {},
|
||||||
parentNode = null
|
parentNode = null
|
||||||
} = options;
|
} = options;
|
||||||
|
const async = options.async ?? false;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (condition) {
|
if (condition) {
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user