TypeError: Cannot read property 'offsetWidth' of null
See original GitHub issueI try to place the diagram in a router then switch between other routers. Then I got this boy:
Uncaught TypeError: Cannot read property 'offsetWidth' of null
at LabelWidget.render (LabelWidget.tsx:92)
at finishClassComponent (react-dom.development.js:17160)
at updateClassComponent (react-dom.development.js:17110)
at beginWork (react-dom.development.js:18620)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at beginWork$1 (react-dom.development.js:23203)
at performUnitOfWork (react-dom.development.js:22154)
at workLoopSync (react-dom.development.js:22130)
at performSyncWorkOnRoot (react-dom.development.js:21756)
at react-dom.development.js:11089
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at flushSyncCallbackQueueImpl (react-dom.development.js:11084)
at flushSyncCallbackQueue (react-dom.development.js:11072)
at scheduleUpdateOnFiber (react-dom.development.js:21199)
at Object.enqueueSetState (react-dom.development.js:12639)
at LocationProvider.push../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:471)
at index.js:103
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:10
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'offsetWidth' of null
But I am getting the error "Uncaught TypeError: Cannot read property 'offsetWidth' of null" and my map is not getting load . My...
Read more >TypeError: Cannot read property 'offsetWidth' of null #2 - GitHub
In my case the error occurs because I add/remove the 'InfiniteLoading' component via {#if items.indexOf(item) == 0} only at the beginning of a ......
Read more >Uncaught TypeError: Cannot read property 'offsetWidth' of null
With the Parent Theme the error doesn't appear. I got a solution. I just wanted to raise that themegrill need to take more...
Read more >Cannot read property 'offsetWidth' of null at e.read (uikit.min.js ...
Uncaught TypeError: Cannot read property 'offsetWidth' of null at e.read (uikit.min.js?2.0.5:3). Hi guys,. i'm updating my site from YOO_Katana ...
Read more >"Cannot read property 'offsetWidth' of null" Error - concrete5
I have found that the problem with offsetWidth of Null (or 'a is null') comes from not having a set width on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a similar error when using the react-tabs component and switching back and forth to a tab containing react-diagrams:
I tried to put the useEffect hook above but I get an error:
TypeScript error in C:/React/my-app/src/App.tsx(18,21): Argument of type ‘null’ is not assignable to parameter of type ‘DiagramModel<DiagramModelGenerics>’. TS2345
I get this error when calling
curve.getSVGCurve()
, where curve is a BezierCurve.