Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.get(`http://localhost:3000/dark-jedis/${this.id}`)
.end((err, res) => {
if (err)
throw "Eehh. Got error. Unspecified behavior.";
const data = res.body;
transaction(() => {
this.name = data.name;
this.homeworld = data.homeworld;
this.master = data.master.id;
this.apprentice = data.apprentice.id;
this.isLoaded = true;
});
this.loadSiblings();
});
autorunUntil(
() => !this.isVisible || this.store.hasSithOnCurrentPlanet,
() => {
this.fetcher.abort();
if (this.isVisible && !this.isLoaded) {
autorunUntil(() => !this.store.hasSithOnCurrentPlanet, () => {
this.load();
});
}
}
);
}