From a35d6195cf71da0102953e2d1d43f621dca9f04c Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Sat, 9 Jan 2021 16:53:33 +0530 Subject: [PATCH] Bugfix: Medium URL question mark wasn't being added properly It was adding the question-mark only if ? was found at position 0 (i.e. at the beginning) instead of at position -1 (i.e. not present at all). --- seance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seance.js b/seance.js index 2b51651..6410777 100644 --- a/seance.js +++ b/seance.js @@ -340,7 +340,7 @@ class Seance { // intelligently add ?json attribute if (mediumUrl.indexOf('format=json') == -1) { - if (mediumUrl.indexOf('?') == 0) { + if (mediumUrl.indexOf('?') == -1) { mediumUrl = `${mediumUrl}?format=json` } else { mediumUrl = `${mediumUrl}&format=json`