We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03975f1 commit a4dcc86Copy full SHA for a4dcc86
ui/src/views/AutogenView.vue
@@ -1196,15 +1196,12 @@ export default {
1196
}
1197
1198
1199
- if (this.items.length > 0) {
1200
- if (!this.showAction || this.dataView) {
1201
- this.resource = this.items[0]
1202
- this.$emit('change-resource', this.resource)
1203
- }
1204
- } else {
1205
- if (this.dataView) {
1206
- this.$router.push({ path: '/exception/404' })
1207
+ if (this.items.length <= 0 && this.dataView) {
+ this.$router.push({ path: '/exception/404' })
+ }
+ if (!this.showAction || this.dataView) {
+ this.resource = this.items?.[0] || {}
+ this.$emit('change-resource', this.resource)
1208
1209
}).catch(error => {
1210
if (!error || !error.message) {
0 commit comments