Add empty object check for permissions (#8513)

This commit is contained in:
ian
2021-10-05 00:35:37 +08:00
committed by GitHub
parent b0991ca353
commit 171eb369cd

View File

@@ -33,7 +33,7 @@
</template>
<script lang="ts">
import { get, set } from 'lodash';
import { get, set, isEmpty } from 'lodash';
import { defineComponent, PropType, computed, toRefs } from 'vue';
import { useI18n } from 'vue-i18n';
import { Filter, FieldFilter } from '@directus/shared/types';
@@ -69,7 +69,7 @@ export default defineComponent({
const innerValue = computed<Filter[]>({
get() {
if (!props.value) return [];
if (!props.value || isEmpty(props.value)) return [];
const name = getNodeName(props.value);