Skip to content

Commit f5b89a2

Browse files
authored
Merge pull request #143 from glific/enhancement/update-variables
updating fields completion when creating a new one
2 parents bf2af9a + a893931 commit f5b89a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@glific/flow-editor",
33
"license": "AGPL-3.0",
44
"repository": "git://github.com/glific/floweditor.git",
5-
"version": "1.26.3-20",
5+
"version": "1.26.3-21",
66
"description": "'Standalone flow editing tool designed for use within the Glific suite of messaging tools'",
77
"browser": "umd/flow-editor.min.js",
88
"unpkg": "umd/flow-editor.min.js",

src/store/thunks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,13 @@ export const addAsset: AddAsset = (assetType: string, asset: Asset) => (
447447
} = getState();
448448

449449
const updated = mutate(assetStore, {
450-
[assetType]: { items: { $merge: { [asset.id]: asset } } }
450+
[assetType]: { items: { $merge: { [asset.id || asset.name]: asset } } }
451451
});
452452

453453
// update our temba store if we have one
454454
const store: TembaStore = document.querySelector('temba-store');
455455
if (store) {
456-
store.setKeyedAssets(assetType, Object.keys(updated[assetType]));
456+
store.setKeyedAssets(assetType, Object.keys(updated[assetType].items));
457457
}
458458

459459
dispatch(updateAssets(updated));

0 commit comments

Comments
 (0)