refactor(warnings): only show for node_env=development

This commit is contained in:
moklick
2022-05-02 14:31:44 +02:00
parent 9331ccc544
commit 2ad60c19a2
6 changed files with 52 additions and 34 deletions
+5 -3
View File
@@ -141,9 +141,11 @@ export function createPositionChange({
]
: currentExtent;
} else {
console.warn(
'[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error-decoder#500'
);
if (process.env.NODE_ENV === 'development') {
console.warn(
'[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error-decoder#500'
);
}
currentExtent = nodeExtent;
}
}