File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
packages/app-backend-core/src Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
createBackendContext ,
3
3
BackendContext ,
4
4
Plugin ,
5
- BuiltinBackendFeature
5
+ BuiltinBackendFeature ,
6
+ AppRecord
6
7
} from '@vue-devtools/app-backend-api'
7
8
import {
8
9
Bridge ,
@@ -129,9 +130,17 @@ async function connect () {
129
130
} )
130
131
131
132
hook . on ( HookEvents . COMPONENT_UPDATED , ( app , uid ) => {
132
- const id = app ? getComponentId ( app , uid , ctx ) : ctx . currentInspectedComponentId
133
+ let id : string
134
+ let appRecord : AppRecord
135
+ if ( app && uid != null ) {
136
+ id = getComponentId ( app , uid , ctx )
137
+ appRecord = getAppRecord ( app , ctx )
138
+ } else {
139
+ id = ctx . currentInspectedComponentId
140
+ appRecord = ctx . currentAppRecord
141
+ }
133
142
if ( id && isSubscribed ( BridgeSubscriptions . SELECTED_COMPONENT_DATA , sub => sub . payload . instanceId === id ) ) {
134
- sendSelectedComponentData ( getAppRecord ( app , ctx ) , id , ctx )
143
+ sendSelectedComponentData ( appRecord , id , ctx )
135
144
}
136
145
} )
137
146
You can’t perform that action at this time.
0 commit comments