Initial commit: GamePortrait 竖屏版 - 深色豪华主题

This commit is contained in:
li
2026-01-16 17:47:53 +08:00
commit 40976e4b45
26611 changed files with 2843638 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import { noop } from "./basic.mjs";
import { isPromise } from "./validate.mjs";
function callInterceptor(interceptor, {
args = [],
done,
canceled
}) {
if (interceptor) {
const returnVal = interceptor.apply(null, args);
if (isPromise(returnVal)) {
returnVal.then((value) => {
if (value) {
done();
} else if (canceled) {
canceled();
}
}).catch(noop);
} else if (returnVal) {
done();
} else if (canceled) {
canceled();
}
} else {
done();
}
}
export {
callInterceptor
};