Fix crash when deselecting layer while editing properties (#665)

- Remove field acsess after destruction
This commit is contained in:
mfish33
2022-06-06 18:59:39 -07:00
committed by Keavon Chambers
parent e6d096f73e
commit c618f43c04
2 changed files with 12 additions and 4 deletions

View File

@@ -141,8 +141,8 @@ export default defineComponent({
this.editing = false;
const inputElement = (this.$refs.fieldInput as typeof FieldInput).$refs.input as HTMLInputElement;
inputElement.blur();
const inputElement = (this.$refs.fieldInput as typeof FieldInput)?.$refs?.input as HTMLInputElement | undefined;
inputElement?.blur();
},
onCancelTextChange() {
this.updateValue(undefined);