Skip to content

Commit

Permalink
ignore storage not prefix on set function
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed May 14, 2024
1 parent 3ce85e9 commit 6861c91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export class Storage {
* @param engine_storage if true, will use engine storage instead of default storage.
*/
set(key_name: string, value: RawStorageRecord["value"], engine_storage: boolean = false) {
key_name = key_name.startsWith("not:") ? key_name.replace("not:", "") : key_name;
const storage = engine_storage ? this.engine_storage : this.internal_storage;
if (!(key_name in storage)) {
this.data.logger.log_message(`There's no storage value with key '${key_name}'.`);
Expand Down

0 comments on commit 6861c91

Please sign in to comment.