Skip to content

Commit

Permalink
Replaces in right place
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed May 5, 2018
1 parent f8fbad8 commit f710fc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/cocoon.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
if (typeof pnew_id == "string" || typeof pnew_id == "number") {
new_content = content.replace(regexp_inputid,
'$& value="' + pnew_id + '" ');
new_content = content.replace(regexp_inputid2,
new_content = new_content.replace(regexp_inputid2,
'$& value="' + pnew_id + '" ');
new_id = pnew_id;
} else {
Expand All @@ -78,7 +78,7 @@
new_id = pnew_id[assoc]
new_content = content.replace(regexp_inputid,
'$& value="' + new_id + '" ');
new_content = content.replace(regexp_inputid2,
new_content = new_content.replace(regexp_inputid2,
'$& value="' + new_id + '" ');
for (var i in pnew_id) {
if (i != assoc) {
Expand Down

0 comments on commit f710fc1

Please sign in to comment.