aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx')
-rw-r--r--src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
index 85c20760e..3386bfd1c 100644
--- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
+++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
@@ -44,10 +44,10 @@ export default class InputField extends React.Component<IInputProps, IState> {
epsilon: number = 0.01;
componentDidUpdate(prevProps: Readonly<IInputProps>, prevState: Readonly<IState>, snapshot?: any): void {
- if (prevProps.value != this.props.value) {
+ if (prevProps.value != this.props.value && !isNaN(this.props.value)) {
if (this.props.mode == "Freeform") {
if (Math.abs(this.state.tempValue - Number(this.props.value)) > 1) {
- console.log('update temp value')
+ console.log('update temp value', Number(this.props.value))
this.setState({tempValue: Number(this.props.value)})
}
}