Skip to content

Commit da45caf

Browse files
authored
fix: Add await to context store put operations (#166)
1 parent 3254fa1 commit da45caf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/smart-app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class SmartApp {
427427
ctx.setLocationId(isa.locationId)
428428

429429
if (this._contextStore) {
430-
this._contextStore.put({
430+
await this._contextStore.put({
431431
installedAppId: ctx.installedAppId,
432432
locationId: ctx.locationId,
433433
authToken: auth.access_token,
@@ -540,7 +540,7 @@ class SmartApp {
540540
this._log.event(evt)
541541
await this._installedHandler(context, evt.installData)
542542
if (this._contextStore) {
543-
this._contextStore.put({
543+
await this._contextStore.put({
544544
installedAppId: context.installedAppId,
545545
locationId: context.locationId,
546546
authToken: context.authToken,
@@ -559,7 +559,7 @@ class SmartApp {
559559
this._log.event(evt)
560560
await this._updatedHandler(context, evt.updateData)
561561
if (this._contextStore) {
562-
this._contextStore.put({
562+
await this._contextStore.put({
563563
installedAppId: context.installedAppId,
564564
locationId: context.locationId,
565565
authToken: context.authToken,

0 commit comments

Comments
 (0)