Skip to content

Commit

Permalink
Replaced string-based type comparison with instanceof, fixed producti…
Browse files Browse the repository at this point in the history
…on-only build issue where constructor names become uglified
  • Loading branch information
Nerdinacan committed Nov 12, 2018
1 parent 020bbe9 commit 57abad3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/galaxy/scripts/app/singleton.js
Expand Up @@ -11,8 +11,7 @@ export function setGalaxyInstance(factory, atTop = true) {

let storage = getStorage(atTop);
let newInstance = factory(GalaxyApp);

if (newInstance.constructor.name != "GalaxyApp") {
if (!(newInstance instanceof GalaxyApp)) {
newInstance = new GalaxyApp(newInstance);
}
if (newInstance.debug === undefined) {
Expand Down

0 comments on commit 57abad3

Please sign in to comment.