We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6761b67 commit ccc75c4Copy full SHA for ccc75c4
1 file changed
resources/js/components/assets/Editor/Editor.vue
@@ -295,7 +295,11 @@ export default {
295
this.$axios.get(url).then(response => {
296
const data = response.data.data;
297
this.asset = data;
298
- this.values = data.values;
+
299
+ // If there are no fields, it will be an empty array when PHP encodes
300
+ // it into JSON on the server. We'll ensure it's always an object.
301
+ this.values = _.isArray(data.values) ? {} : data.values;
302
303
this.meta = data.meta;
304
this.actionUrl = data.actionUrl;
305
this.actions = data.actions;
0 commit comments