Format: be future proof against fixes in SpiderMonkey
Modern JS engines (in Firefox and Chrome, as well as node) pass undefined, not '', to the replaced function for groups that are not matched. Be future proof against changes that might go unnoticed when porting to SpiderMonkey 31/38/45/whatever that will be, and also if people extract this code and use it against different engines. (At least SM 34 has the right behavior, not sure about 31) https://bugzilla.gnome.org/show_bug.cgi?id=770111
parent
6ce2defb
Please register or sign in to comment