We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce0046b commit 33ff877Copy full SHA for 33ff877
1 file changed
showModalDialog.js
@@ -144,7 +144,7 @@
144
dialog.addEventListener('close', function() {
145
var returnValue = lastDialog.querySelector('#dialog-body').contentWindow.returnValue;
146
dialogDocument.body.removeChild(dialog);
147
- nextStmts[0] = nextStmts[0].replace(new RegExp('(window\.)?' + callerName + '\(.*\)' , 'g'), JSON.stringify(returnValue));
+ nextStmts[0] = nextStmts[0].replace(new RegExp('(window\.)?' + callerName + '.*(\\).*)$' , 'g'), JSON.stringify(returnValue) + "$2");
148
var decodedStmts = nextStmts.join('\n').replace(/^function\s+\(\s*\)\s*{/, '');
149
var unopenedBraces = (decodedStmts.match(/}/g) || []).length - (decodedStmts.match(/{/g) || []).length;
150
var openBraces = repeat('{', unopenedBraces);
0 commit comments