Skip to content

Commit 7cd6958

Browse files
committed
MC-15146: Unify DataStore get and update interface
- Use utility for value setting
1 parent aed341f commit 7cd6958

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/data-store.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/data-store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import $ from "jquery";
7-
import {get} from "./utils/object";
7+
import {get, set} from "./utils/object";
88

99
interface DataStoreEvent {
1010
state: DataObject;
@@ -46,7 +46,7 @@ export default class DataStore {
4646
* @param value
4747
*/
4848
public set(key: string, value: any) {
49-
this.state[key] = value;
49+
set(this.state, key, value);
5050
this.emitState();
5151
}
5252

0 commit comments

Comments
 (0)