There is not a need for an explicit check on how many times the Smartcar class has been instantiated.
This PR stems from an error that occurs when the onComplete callback is triggered with only one parameter. ReactDOM will swallow the thrown error that's triggered and run React's resetContextDependencies function to replay the event on a separate thread.
The result of this triggers a reload of the component, which then triggers the hasBeenInstantiated error.
There is not a need for an explicit check on how many times the Smartcar class has been instantiated.
This PR stems from an error that occurs when the onComplete callback is triggered with only one parameter. ReactDOM will swallow the thrown error that's triggered and run React's resetContextDependencies function to replay the event on a separate thread.
The result of this triggers a reload of the component, which then triggers the hasBeenInstantiated error.