Skip to content

Commit

Permalink
👌 Handling undefined possibility in action dropdown blur event
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Nov 14, 2022
1 parent 3b1006f commit 8750907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default Vue.extend({
this.$emit('select', action);
},
onButtonBlur(event: FocusEvent): void {
const elementDropdown = this.$refs.elementDropdown as Vue & { hide: () => void };
const elementDropdown = this.$refs.elementDropdown as Vue & { hide: () => void } | undefined;
// Hide dropdown when clicking outside of current document
if (elementDropdown && event.relatedTarget === null) {
elementDropdown.hide();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default mixins(restApi, showMessage, executionHelpers).extend({
},
onRetryButtonBlur(event: FocusEvent): void {
// Hide dropdown when clicking outside of current document
const retryDropdown = this.$refs.retryDropdown as Vue & { hide: () => void };
const retryDropdown = this.$refs.retryDropdown as Vue & { hide: () => void } | undefined;
if (retryDropdown && event.relatedTarget === null) {
retryDropdown.hide();
}
Expand Down

0 comments on commit 8750907

Please sign in to comment.