qidian-shared 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12628,7 +12628,7 @@ function parseRelaxedJSON(str, options) {
|
|
|
12628
12628
|
const endObj = str.lastIndexOf("}");
|
|
12629
12629
|
const startArr = str.indexOf("[");
|
|
12630
12630
|
const endArr = str.lastIndexOf("]");
|
|
12631
|
-
if (startObj > -1 && endObj > -1 && endObj > startObj) {
|
|
12631
|
+
if (startObj > -1 && (startObj < startArr || startArr === -1) && endObj > -1 && (endObj > endArr || endArr === -1) && endObj > startObj) {
|
|
12632
12632
|
str = str.slice(startObj, endObj + 1);
|
|
12633
12633
|
} else if (startArr > -1 && endArr > -1 && endArr > startArr) {
|
|
12634
12634
|
str = str.slice(startArr, endArr + 1);
|