From e83c7b8ee095ea3d78ab302585a99313d0114fd6 Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Thu, 26 Sep 2024 13:38:38 +0200 Subject: [PATCH] fff --- gulpfile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 32b6e3b..34a1ea0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -308,7 +308,12 @@ async function publishToFoundry(done) { body: JSON.stringify(payload), }); - const responseData = await response.json(); + let responseData; + if (contentType && contentType.includes('application/json')) { + responseData = await response.json(); + } else { + responseData = await response.text(); + } if (responseData.status === 'success') { console.log('Successfully published to Foundry VTT:');