mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 12:15:33 +00:00
Bug 1048000
- Expect undefined for non-matching regex groups. r=bnicholson
This commit is contained in:
parent
2622559577
commit
821554a3e1
@ -573,9 +573,9 @@ let PromptUtils = {
|
||||
if (!aLabel)
|
||||
return "";
|
||||
|
||||
if (/ *\(\&([^&])\)(:)?$/.test(aLabel)) {
|
||||
if (/ *\(\&([^&])\)(:?)$/.test(aLabel)) {
|
||||
aLabel = RegExp.leftContext + RegExp.$2;
|
||||
} else if (/^(.*[^&])?\&(([^&]).*$)/.test(aLabel)) {
|
||||
} else if (/^([^&]*)\&(([^&]).*$)/.test(aLabel)) {
|
||||
aLabel = RegExp.$1 + RegExp.$2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user