Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhang1030 committed May 20, 2024
1 parent f198328 commit c5ea813
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/devtools-kit/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import { updatePluginDetectives } from './plugin'

export { collectDevToolsPlugin } from './plugin'

const stateEditor = new StateEditor()

export class DevToolsPluginApi {
public on: typeof on
public clear = remove
Expand Down Expand Up @@ -150,11 +148,13 @@ export class DevToolsPluginApi {
}

async editInspectorState(payload: InspectorStateEditorPayload) {
const stateEditor = new StateEditor()
apiHooks.callHook(DevToolsEvents.EDIT_INSPECTOR_STATE, {
...payload,
app: devtoolsContext.appRecord?.app,
set: (obj, path = payload.path, value = payload.state.value, cb) => {
stateEditor.set(obj, path, value, cb || stateEditor.createDefaultSetCallback(payload.state))
console.log('set', obj, path, value, cb || stateEditor.createDefaultSetCallback(payload.state))
},
})
}
Expand Down

0 comments on commit c5ea813

Please sign in to comment.