🧹 clean up editor based on #1418 (#2010)

* clean up editor based on #1418

* remove unused ref

* address comment on guard style
This commit is contained in:
Mutasem Aldmour
2021-07-23 17:50:47 +02:00
committed by GitHub
parent 5602929210
commit a9550202df
19 changed files with 8 additions and 54 deletions

View File

@@ -262,9 +262,7 @@ export default mixins(
// Convert the expression string into a Quill Operations
const editorOperations: DeltaOperation[] = [];
currentValue.replace(/\{\{(.*?)\}\}/ig, '*%%#_@^$1*%%#_@').split('*%%#_@').forEach((value: string) => {
if (!value) {
} else if (value.charAt(0) === '^') {
if (value && value.charAt(0) === '^') {
// Is variable
let displayValue = `{{${value.slice(1)}}}` as string | number | boolean | null | undefined;
if (this.resolvedValue) {