Closed zhuowei closed 2 years ago
Looks like formats/zip.js
does not compile due to FILTER_ROMS
regex. That's why ZIP_MAGIC
doesn't even get to be defined.
According to can I use the ?<!
negative lookbehind prefix is not implemented in Safari. And sincerely, I don't know why. I always thought regular expressions were a standard and should implement all syntax.
Fixed in 539b3080bca6637775275e6fe0ceb50b18a6fec2 :-)
When loading a file on Safari 15.0/macOS 11.6, I get:
[Error] SyntaxError: Invalid regular expression: invalid group specifier name (anonymous function) (zip.js:7) [Error] ReferenceError: Can't find variable: ZIP_MAGIC _parseROM (RomPatcher.js:188) (anonymous function) (MarcFile.js:26)
The line corresponds to https://github.com/marcrobledo/RomPatcher.js/blob/458d7297e4dc056eb00b4293ef11eff1da9f6c91/js/formats/zip.js#L7.
This works on Firefox 95.0.1.