Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
// don't try to load a second time
if (isLoaded()) {
resolve(dojoRequire);
}
// wrap bootstrap in a promise
bootstrap((err) => {
if (err) {
reject(err);
} else {
resolve(dojoRequire);
}
}, options);
});
}
return new Promise((resolve: Function, reject: Function) => {
// don't try to load a second time
if (isLoaded()) {
resolve(dojoRequire);
}
// wrap bootstrap in a promise
bootstrap((err: Error) => {
if (err) {
reject(err);
} else {
resolve(dojoRequire);
}
}, options);
});
}