Skip to content

Commit 476c133

Browse files
authored
fix: bugfix to context store remove item methods (#264)
1 parent 0be7fdb commit 476c133

File tree

5 files changed

+3031
-1822
lines changed

5 files changed

+3031
-1822
lines changed

lib/util/smart-app-context.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ module.exports = class SmartAppContext {
337337

338338
removeItem(key) {
339339
if (this.app._contextStore) {
340-
if (this.app._contextStore.clearItem) {
341-
return this.app._contextStore.clearItem(this.installedAppId, key)
340+
if (this.app._contextStore.removeItem) {
341+
return this.app._contextStore.removeItem(this.installedAppId, key)
342342
}
343343
throw new Error('Context store does not support clearing individual item.')
344344
}
@@ -347,8 +347,8 @@ module.exports = class SmartAppContext {
347347

348348
removeAllItems() {
349349
if (this.app._contextStore) {
350-
if (this.app._contextStore.clearAllItems) {
351-
return this.app._contextStore.clearAllItems(this.installedAppId)
350+
if (this.app._contextStore.removeAllItems) {
351+
return this.app._contextStore.removeAllItems(this.installedAppId)
352352
}
353353
throw new Error('Context store does not support clearing all items.')
354354
}

0 commit comments

Comments
 (0)