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).
This commit is contained in:
parent
302a74d679
commit
a35d6195cf
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ class Seance {
|
||||||
|
|
||||||
// intelligently add ?json attribute
|
// intelligently add ?json attribute
|
||||||
if (mediumUrl.indexOf('format=json') == -1) {
|
if (mediumUrl.indexOf('format=json') == -1) {
|
||||||
if (mediumUrl.indexOf('?') == 0) {
|
if (mediumUrl.indexOf('?') == -1) {
|
||||||
mediumUrl = `${mediumUrl}?format=json`
|
mediumUrl = `${mediumUrl}?format=json`
|
||||||
} else {
|
} else {
|
||||||
mediumUrl = `${mediumUrl}&format=json`
|
mediumUrl = `${mediumUrl}&format=json`
|
||||||
|
|
Loading…
Reference in a new issue