Cannot read property 'Inside' of undefined
See original GitHub issuereact-d3-speedometer version: 0.12.0 react version: 16.13.1 typescript: 3.7.2
Question
I was trying to implement react-d3-speedometer using typescript.
When I tried to apply position in customSegmentLabels , I get an error Type '"OUTSIDE"' is not assignable to type 'CustomSegmentLabelPosition'
. So I added it to imports but when I assigned it to position like this:
position: CustomSegmentLabelPosition.Inside,
then the error Cannot read property ‘Inside’ of undefined.
Sample Codesandbox
Sample
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Cannot Read Property of Undefined in JavaScript - Rollbar
Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong...
Read more >Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
Read more >Uncaught TypeError : Cannot read properties of undefined
The solution to TypeError: Cannot read properties of undefined ... The root cause of the error is that the declared variable doesn't have...
Read more >angular2: Error: TypeError: Cannot read property '...' of ...
Because I have several property inside a JSON and it is not possible for each property to write if condition. Earlier in angularjs...
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 Free
Top 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
Also regarding
I’m tracking this here - https://github.com/palerdot/react-d3-speedometer/issues/82
Hi,
I’m reopening this issue to keep track of this behavior. The right behavior is to do
CustomSegmentLabelPosition.Inside / CustomSegmentLabelPosition.Outside
…