Skip to content

Commit

Permalink
Check if all variables are set before making request
Browse files Browse the repository at this point in the history
  • Loading branch information
dnwjn committed Feb 5, 2022
1 parent fb9490e commit dac00c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/js/components/NovaButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
error: false,
}),
mounted() {
this.$nextTick(function() {
this.$nextTick(() => {
this.buttonWidth = this.$refs.novabutton.clientWidth + 2 + 'px';
});
},
Expand Down Expand Up @@ -75,6 +75,10 @@ export default {
post() {
this.$emit('loading');
if (_.isEmpty(this.resourceName) || _.isEmpty(this.resourceId) || _.isEmpty(this.field?.key)) {
return;
}
window.setTimeout(() => {
this.loading = true;
}, 200);
Expand Down

0 comments on commit dac00c4

Please sign in to comment.