Skip to content

Commit

Permalink
Update glyph-core.js
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchyfishys authored Jun 17, 2024
1 parent 62710d9 commit d9388f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/glyphs/glyph-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,13 @@ export const Glyphs = {
removeFromInventory(glyph) {
// This can get called on a glyph not in inventory, during auto sacrifice.
if (glyph.idx === null) return;
this.idate();
this.validate();
const index = player.reality.glyphs.inventory.indexOf(glyph);
if (index < 0) return;
this.inventory[glyph.idx] = null;
player.reality.glyphs.inventory.splice(index, 1);
EventHub.dispatch(GAME_EVENT.GLYPHS_CHANGED);
this.idate();
this.validate();
},
validate() {
for (const glyph of player.reality.glyphs.inventory) {
Expand Down

0 comments on commit d9388f2

Please sign in to comment.