Skip to content

Commit cce0708

Browse files
committed
update builds
1 parent a901b98 commit cce0708

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

dist/rilti.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,11 +1407,17 @@
14071407
return el
14081408
}
14091409

1410-
const componentReady = (el, fn) => run(() => {
1410+
const componentReady = (el, fn) => new Promise(resolve => run(() => {
14111411
el = $(el)
1412-
if (el.componentReady) return fn(el)
1413-
el.once.componentReady(e => fn(el))
1414-
})
1412+
if (el.componentReady) {
1413+
resolve(el)
1414+
if (fn) return fn(el)
1415+
}
1416+
el.once.componentReady(e => {
1417+
resolve(el)
1418+
if (fn) fn(el)
1419+
})
1420+
}))
14151421

14161422
exports.isArr = isArr
14171423
exports.isComponent = isComponent

0 commit comments

Comments
 (0)