JavaScript String.prototype.replace

RESOLVED DUPLICATE of bug 369778

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 369778
3 years ago
3 years ago

People

(Reporter: Zhenzhen Zhan, Unassigned)

Tracking

29 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807

Steps to reproduce:

Maybe it's a JavaScript String.prototype.replace bug. In all other browsers, the p1 argument is undefined. But in Firefox it's "".
"abc".replace(/a(c)?/,function(match,p1,p2){console.log(match,p1);return match;})


Actual results:

"a" ""


Expected results:

"a" undefined

Updated

3 years ago
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 369778
You need to log in before you can comment on or make changes to this bug.