Skip to content

Commit 90c6c33

Browse files
committed
Allow both )]} and )]}' as XSSI prefixes
1 parent 9fdbdd0 commit 90c6c33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sourcemap/decoder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def decode(self, source):
104104
# According to spec (https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.h7yy76c5il9v)
105105
# A SouceMap may be prepended with ")]}'" to cause a Javascript error.
106106
# If the file starts with that string, ignore the entire first line.
107-
if source[:4] == ")]}'":
107+
if source[:4] == ")]}'" or source[:3] == ")]}":
108108
source = source.split('\n', 1)[1]
109109

110110
smap = json.loads(source)

0 commit comments

Comments
 (0)