Skip to content

Commit

Permalink
fix: handle missing dojoConfig in deployed app
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Mar 28, 2023
1 parent d7bcafd commit e23badb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _src/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ define([
let dataEntryApp = 'https://electrofishing.ugrc.utah.gov';
let baseUrl;

const projectId = window.dojoConfig.isJasmineTestRunner ? 'test' :
const projectId = window?.dojoConfig.isJasmineTestRunner ? 'test' :
JSON.parse(process.env.FIREBASE_CONFIG).projectId;
if (has('agrc-build') === 'prod') {
// *.ugrc.utah.gov
Expand Down
2 changes: 1 addition & 1 deletion _src/app/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
return window.Worker;
});

if (!window.dojoConfig.isJasmineTestRunner) {
if (!window?.dojoConfig.isJasmineTestRunner) {
window.firebase.initializeApp(JSON.parse(process.env.FIREBASE_CONFIG));
console.log('firebase app initialized');
}
Expand Down

0 comments on commit e23badb

Please sign in to comment.