Skip to content

Commit

Permalink
Fixed an issue when label Text is null.
Browse files Browse the repository at this point in the history
To reproduce this:
1. type `a=b`
2. add `if` in front of the above line.
  • Loading branch information
MrCoder committed Nov 8, 2024
1 parent a41ec35 commit 5158fe6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@keyup="handleKeyup"
@keydown="handleKeydown"
>
{{ fomattedLabelText }}
{{ formattedLabelText }}
</label>
</template>
<script setup lang="ts">
Expand All @@ -29,6 +29,7 @@ const props = withDefaults(
isSelf?: boolean;
}>(),
{
labelText: "",
isAsync: false,
isSelf: false,
},
Expand All @@ -41,7 +42,7 @@ const code = computed(() => store.getters.code);
const onContentChange = computed(
() => store.getters.onContentChange || (() => {}),
);
const fomattedLabelText = computed(() => formatText(labelText.value));
const formattedLabelText = computed(() => formatText(labelText.value));
function updateCode(code: string) {
store.dispatch("updateCode", { code });
Expand Down

0 comments on commit 5158fe6

Please sign in to comment.