refactor(dev-warnings): cleanup

This commit is contained in:
moklick
2022-08-17 11:55:37 +02:00
parent ab14be02f4
commit 86ea34b470
9 changed files with 39 additions and 46 deletions
+6
View File
@@ -46,3 +46,9 @@ export const internalsSymbol = Symbol.for('internals');
// used for a11y key board controls for nodes and edges
export const elementSelectionKeys = ['Enter', ' ', 'Escape'];
export const devWarn = (message: string) => {
if (process.env.NODE_ENV === 'development') {
console.warn(`[React Flow]: ${message}`);
}
};