Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Use function as default value for array prop

Liyas Thomasa4c5817b54c2
diff --git a/components/graphql/type.vue b/components/graphql/type.vue
index 42bfdce08..146d2ad49 100644
--- a/components/graphql/type.vue
+++ b/components/graphql/type.vue
@@ -31,7 +31,7 @@ export default {
gqlType: {},
jumpTypeCallback: Function,
isHighlighted: { type: Boolean, default: false },
- highlightedFields: { type: Array, default: [] },
+ highlightedFields: { type: Array, default: () => [] },
},
methods: {
isFieldHighlighted({ field }) {