From c0b810ba8d9d731369ec4e8a12f36fea3bb81bbf Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 18 Nov 2019 07:06:39 +0100 Subject: [PATCH] assign file content --- src/i18n.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n.js b/src/i18n.js index a3b5b5b..936109a 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -28,9 +28,12 @@ function saveMessage(message) { function checkMessageAndSave(message, messagesFilePath) { if (!knownMessages[message]) { knownMessages[message] = message; - RNFS.writeFile(messagesFilePath, JSON.stringify(knownMessages, null, 2), 'utf8') + const contents = JSON.stringify(knownMessages, null, 2); + + RNFS.writeFile(messagesFilePath, contents, 'utf8') .then(() => { // successful write + // send to transifex }) .catch(err => { if (err) {