Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom widgets #47

Merged
merged 11 commits into from
Dec 3, 2020
9 changes: 5 additions & 4 deletions packages/jupyter-widgets/src/manager/widget-loader.ts
Original file line number Diff line number Diff line change
@@ -43,10 +43,11 @@ function requirePromise(pkg: string | string[]): Promise<any> {
return new Promise((resolve, reject) => {
const require = (window as any).requirejs;
if (require === undefined) {
reject('Requirejs is needed, please ensure it is loaded on the page.');
} else {
// tslint:disable-next-line: non-literal-require
require(pkg, resolve, reject);
reject('Requirejs is needed, please ensure it is loaded on the page.');
}
else {
// tslint:disable-next-line: non-literal-require
require(pkg, resolve, reject);
}
});
};