From 19ded375af6945721dbf77b11415fb7682773c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Tue, 2 Oct 2018 14:46:18 +0200 Subject: [PATCH] Emit no experimental warning in browser. closes #361 --- experimentalWarning.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/experimentalWarning.js b/experimentalWarning.js index 27003face2..78e841495b 100644 --- a/experimentalWarning.js +++ b/experimentalWarning.js @@ -10,4 +10,8 @@ function emitExperimentalWarning(feature) { process.emitWarning(msg, 'ExperimentalWarning'); } -module.exports.emitExperimentalWarning = emitExperimentalWarning; +function noop() {} + +module.exports.emitExperimentalWarning = process.emitWarning + ? emitExperimentalWarning + : noop;