Skip to content

Commit 328dbb7

Browse files
committed
Fix typo in getting region from local storage
1 parent 4e356d3 commit 328dbb7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

public/global.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ const parseJSONText = (jsonText) => {
99

1010
// updates email Live Preview
1111
const onCodeMirrorChange = (editor) => {
12-
12+
1313
$("#templatePreview").attr("srcDoc", editor.getValue());
1414

1515
// get variables enclosed with {} from editor
1616
let variables =
1717
editor.getValue().match(/(?<=\{{2})[A-Za-z_]+[a-zA-Z0-9_f]*(?=\}{2})/g) || [];
18-
18+
1919
const fillVars = parseJSONText(
2020
window.fillVarsCodeMirrorEditor.getValue()
2121
);
2222

23-
23+
2424
const newFillVars = `{\n ${variables
2525
.map((variable) => `"${variable}": "${fillVars[variable] || ""}"`)
2626
.join(",\n ")}\n}`;
@@ -59,7 +59,7 @@ const onFillVarsChange = (editor) => {
5959

6060
const onFillVarsSave = () => {
6161
previousFillVarsText = window.fillVarsCodeMirrorEditor.getValue()
62-
62+
6363
const lcFillVars = parseJSONText(localStorage.getItem("fillVars"));
6464

6565
const newLcFillVars = {
@@ -105,7 +105,7 @@ function listenToCodeMirror() {
105105
// restore previous fillVars for this template
106106
const lcFillVars = parseJSONText(localStorage.getItem("fillVars"));
107107
const newFillVarsText = JSON.stringify(lcFillVars[templateName] || {}, null, 2);
108-
108+
109109
editor.on("change", onCodeMirrorChange);
110110
varsEditor.on("change", onFillVarsChange);
111111

@@ -132,7 +132,7 @@ function onUploadImageChange({ target: { files } }) {
132132
}
133133

134134
formData.append("file", files[0]);
135-
formData.append("region", localStorage.getItemItem("region"));
135+
formData.append("region", localStorage.getItem("region"));
136136

137137
$.ajax({
138138
type: "POST",

0 commit comments

Comments
 (0)