wip importer
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
ba381636a0
commit
da856152c7
@@ -24,9 +24,11 @@ declare global {
|
||||
|
||||
window.op = (t, ...args) => {
|
||||
// @ts-expect-error
|
||||
const fn = op[t].bind(op);
|
||||
const fn = op[t] ? op[t].bind(op) : undefined;
|
||||
if (typeof fn === 'function') {
|
||||
fn(...args);
|
||||
} else {
|
||||
console.warn(`op.js: ${t} is not a function`);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user