Commit bcb96a8 1 parent 01f01a8 commit bcb96a8 Copy full SHA for bcb96a8
File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -341,9 +341,11 @@ export function DynamicBreadcrumbs({
341
341
342
342
const refitCrumbList = useCallback (
343
343
( { width : wrapperWidth } : { width : number } ) => {
344
- const lists = Array . from (
345
- wrapperRef ?. current ?. querySelectorAll ( `[${ CRUMB_LIST_ATTR } ]` )
346
- )
344
+ const lists = wrapperRef ?. current
345
+ ? Array . from (
346
+ wrapperRef . current . querySelectorAll ( `[${ CRUMB_LIST_ATTR } ]` )
347
+ )
348
+ : [ ]
347
349
const { id } = lists . reduce (
348
350
( prev , next ) => {
349
351
const prevWidth = prev . width
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const useResizeObserver = (
33
33
RO . observe ( ref . current )
34
34
35
35
return ( ) => {
36
- RO . disconnect ( )
36
+ RO ? .disconnect ( )
37
37
RO = null
38
38
}
39
39
} , [ ref , handleResize ] )
You can’t perform that action at this time.
0 commit comments