@@ -136,7 +136,7 @@ async function connect () {
136
136
137
137
hook . on ( HookEvents . COMPONENT_UPDATED , async ( app , uid , parentUid , component ) => {
138
138
try {
139
- if ( ! app || ! uid || ! component ) return
139
+ if ( ! app || ( typeof uid !== 'number' && ! uid ) || ! component ) return
140
140
let id : string
141
141
let appRecord : AppRecord
142
142
if ( app && uid != null ) {
@@ -165,7 +165,7 @@ async function connect () {
165
165
166
166
hook . on ( HookEvents . COMPONENT_ADDED , async ( app , uid , parentUid , component ) => {
167
167
try {
168
- if ( ! app || ! uid || ! component ) return
168
+ if ( ! app || ( typeof uid !== 'number' && ! uid ) || ! component ) return
169
169
const id = await getComponentId ( app , uid , component , ctx )
170
170
const appRecord = await getAppRecord ( app , ctx )
171
171
if ( component ) {
@@ -218,7 +218,7 @@ async function connect () {
218
218
219
219
hook . on ( HookEvents . COMPONENT_REMOVED , async ( app , uid , parentUid , component ) => {
220
220
try {
221
- if ( ! app || ! uid || ! component ) return
221
+ if ( ! app || ( typeof uid !== 'number' && ! uid ) || ! component ) return
222
222
const appRecord = await getAppRecord ( app , ctx )
223
223
if ( parentUid != null ) {
224
224
const parentInstances = await appRecord . backend . api . walkComponentParents ( component )
0 commit comments