Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strings management new #38

Merged
merged 13 commits into from
Nov 2, 2020
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
Yevheniy authored and Yevheniy committed Oct 9, 2020
commit c46818f06b32ade9b56191a4144b1c4d479ca50e
5 changes: 3 additions & 2 deletions ui/plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
let increment;
for (; ;) {
if ((strings || []).some(st => st.identifier === uniqueIdentifier)) {
increment = !!identifier ? (increment + 1) : 1;
increment = !!increment ? (increment + 1) : 1;
uniqueIdentifier = identifier + increment;
} else {
break;
Expand Down Expand Up @@ -546,7 +546,8 @@
strings.push({
id: e[0].data.id,
text: text,
fileId: Number(file)
fileId: Number(file),
identifier: identifier
});
if (selectedText.text) {
window.postMessage('useString', { id: e[0].data.id, text });
Expand Down