From e51fb5cbe1dbea47b2a0f86c8caf5b00068db71e Mon Sep 17 00:00:00 2001 From: JoaoRocha97 Date: Tue, 15 Feb 2022 12:25:46 -0300 Subject: [PATCH] fix(suma2text.js): adding an `if` to check if process exists to emit a warning Adding an `if` to check if process exists to emit a warning on customizing a validator on a typescript project fix #28 --- src/suma2Text.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/suma2Text.js b/src/suma2Text.js index 8ac422e..20ded50 100644 --- a/src/suma2Text.js +++ b/src/suma2Text.js @@ -5,13 +5,13 @@ module.exports = function ( if (languages) { languages.map(({ name, definitions }) => { - process.emitWarning( - `${name}: ${ - textPackage[name] + if (process) + process.emitWarning( + `${name}: ${textPackage[name] ? "will be custumized" : "it's not implemented, why do you wont make a pull request?" - }` - ) + }` + ) const newLanguage = textPackage[name] ? JSON.parse(JSON.stringify(textPackage[name]))