Closed Bug 1015762 Opened 5 years ago Closed 5 years ago

JavaScript String.prototype.replace

Categories

(Core :: JavaScript Engine, defect)

29 Branch
x86
macOS
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 369778

People

(Reporter: zhanzhenzhen, Unassigned)

Details

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
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 369778
You need to log in before you can comment on or make changes to this bug.