Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
riot.settings.autoUpdate = false;
riot.mixin({
// riotx.riotxChange(store, evtName, func)のショートカット。
listen: function(...args) {
const store = this.riotx.get();
this.riotxChange(store, ...args);
},
// pugファイルとjsファイルを分離して実装可能にするため。
external: function(script) {
const tag = this;
script.apply(tag);
},
// `modal`等と意識せずにcloseできるようにする。
close: function() {
if (this.opts.isModal) {
this.opts.modalCloser();
}
};
promise.resolve = () => {
_resolve();
promise.done = true;
clearTimeout(_timeout);
};
_timeout = setTimeout(() => {
promise.resolve();
if (!promise.done) {
this._isAwaiting = false;
console.error(` RiotWaiter >>>
Async operation "${name}" was not finished properly.
Perhaps missing 'this.done("${name}")'.
`);
}
}, riot.settings.asyncRenderTimeout - 500);
this._readyPromises.push(promise);
this._waitReadyState();
},