Skip to content

Commit

Permalink
fix: account for null/undefined itemId
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisrijsdijk committed Sep 15, 2023
1 parent d1fd9ff commit e2238cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/backend/effects/queues/effect-queue-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ class EffectQueueManager extends JsonDbManager {
* @returns {T|null}
*/
getItem(itemId) {
if (itemId == null) {
return null;
}

const item = JSON.parse(JSON.stringify(super.getItem(itemId)));

item.queue = effectQueueRunner.getQueue(itemId);
Expand Down

0 comments on commit e2238cd

Please sign in to comment.