Skip to content

Commit

Permalink
Work when angularjs module is unavailable. Resolves #56. (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning authored Feb 1, 2021
1 parent abaaa75 commit 7e0c5c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/single-spa-angularjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ export default function singleSpaAngularJS(userOpts) {

function bootstrap(opts, mountedInstances, singleSpaProps) {
return Promise.resolve().then(() => {
const module = opts.angular.module("single-spa-angularjs");
let module;
try {
module = opts.angular.module("single-spa-angularjs");
} catch (err) {
// ignore - this means that the module doesn't exist
}
if (module) {
module.config([
"$provide",
Expand Down

0 comments on commit 7e0c5c5

Please sign in to comment.