File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ export function XstateTreeView({ interpreter }: XStateTreeViewProps) {
202202 // This is needed because the inState function needs to be recreated if the
203203 // current state the machine is in changes. But _only_ then
204204 // eslint-disable-next-line react-hooks/exhaustive-deps
205- [ current . value ]
205+ [ current ? .value ]
206206 ) ;
207207 const selectorsProxy = useConstant ( ( ) => {
208208 return new Proxy (
@@ -294,7 +294,7 @@ export function recursivelySend<
294294 ) as unknown as Interpreter < any , any , any , any > [ ] ;
295295
296296 // If the service can't handle the event, don't send it
297- if ( service . state . nextEvents . includes ( ( event as any ) . type ) ) {
297+ if ( service . getSnapshot ( ) ? .nextEvents . includes ( ( event as any ) . type ) ) {
298298 try {
299299 service . send ( event as any ) ;
300300 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments