Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Fixed an issue that caused the renderer to "die" if firebase hadn't b…
Browse files Browse the repository at this point in the history
…een cached
  • Loading branch information
Nick Booth committed Jul 19, 2019
1 parent 390388a commit 0e0b177
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "Doki Doki Mod Manager",
"description": "Mod Manager for Doki Doki Literature Club",
"author": "u/zuudo",
"version": "3.2.4",
"version": "3.2.5",
"homepage": "https://doki.space",
"license": "MIT",
"main": "lib/main/index.js",
Expand Down
22 changes: 14 additions & 8 deletions src/renderer/js/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
firebase.initializeApp({
apiKey: "AIzaSyDInikDCCVFIhpAMPEBaaRmx_p2ZLX-6GY",
authDomain: "doki-doki-mod-manager.firebaseapp.com",
databaseURL: "https://doki-doki-mod-manager.firebaseio.com",
projectId: "doki-doki-mod-manager",
storageBucket: "doki-doki-mod-manager.appspot.com",
messagingSenderId: "324232265869"
});
let firebaseReady = false;

if ("firebase" in window) {
firebaseReady = true;
firebase.initializeApp({
apiKey: "AIzaSyDInikDCCVFIhpAMPEBaaRmx_p2ZLX-6GY",
authDomain: "doki-doki-mod-manager.firebaseapp.com",
databaseURL: "https://doki-doki-mod-manager.firebaseio.com",
projectId: "doki-doki-mod-manager",
storageBucket: "doki-doki-mod-manager.appspot.com",
messagingSenderId: "324232265869"
});
}

const app = new Vue({
"el": "#app",
Expand Down Expand Up @@ -309,6 +314,7 @@ function loginToApp(email) {
}

function getLoggedInUsername() {
if (!firebaseReady) return null;
return (firebase.auth().currentUser ? (firebase.auth().currentUser.displayName ? firebase.auth().currentUser.displayName : firebase.auth().currentUser.email.split("@")[0]) : null);
}

Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2451,11 +2451,6 @@ semver-diff@^2.0.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==

semver@^6.1.1, semver@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db"
integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==

semver@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db"
Expand Down

0 comments on commit 0e0b177

Please sign in to comment.