animate/webGl/my-threejs-test/node_modules/lmdb/util/when.js

9 lines
209 B
JavaScript
Raw Normal View History

2024-06-24 09:24:00 +00:00
export function when(promise, callback, errback) {
if (promise && promise.then) {
return errback ?
promise.then(callback, errback) :
promise.then(callback);
}
return callback(promise);
}