File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ module.exports = class DynamoDBContextStore {
2424 } else {
2525 if ( data . Item ) {
2626 let result = data . Item ;
27- result . config = JSON . parse ( result . config ) ;
27+
28+ // For backward compatibility with version 1.0.1
29+ if ( typeof result . config === 'string' ) {
30+ result . config = JSON . parse ( result . config ) ;
31+ }
2832 resolve ( result ) ;
2933 }
3034 else {
@@ -43,9 +47,7 @@ module.exports = class DynamoDBContextStore {
4347 locationId : params . locationId ,
4448 authToken : params . authToken ,
4549 refreshToken : params . refreshToken ,
46- clientId : params . clientId ,
47- clientSecret : params . clientSecret ,
48- config : JSON . stringify ( params . config )
50+ config : params . config
4951 }
5052 } ;
5153 return new Promise ( ( resolve , reject ) => {
Original file line number Diff line number Diff line change 11{
22 "name" : " @smartthings/dynamodb-context-store" ,
3- "version" : " 1.0.1 " ,
3+ "version" : " 1.0.2 " ,
44 "description" : " Stores SmartApp configuration and auth tokens for use in app-initiated calls" ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments