[cleaup] No need for computed if directly derefed
This commit is contained in:
		
							parent
							
								
									36d6fdfb94
								
							
						
					
					
						commit
						62af4f5026
					
				| 
						 | 
					@ -77,7 +77,7 @@ module.exports = {
 | 
				
			||||||
  rules: {
 | 
					  rules: {
 | 
				
			||||||
    // VueStuff
 | 
					    // VueStuff
 | 
				
			||||||
    // Defaults to error on eslint-plugin-vue 8.0.3, but let us be not too strict with names
 | 
					    // Defaults to error on eslint-plugin-vue 8.0.3, but let us be not too strict with names
 | 
				
			||||||
    'vue/multi-word-component-names': 'warn',
 | 
					    'vue/multi-word-component-names': 'off',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Rejects on promises should always be of the Error type (and allow empty rejects as well)
 | 
					    // Rejects on promises should always be of the Error type (and allow empty rejects as well)
 | 
				
			||||||
    'prefer-promise-reject-errors': ["error", {"allowEmptyReject": true}],
 | 
					    'prefer-promise-reject-errors': ["error", {"allowEmptyReject": true}],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,7 @@
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { computed, defineComponent, PropType } from 'vue';
 | 
					import { defineComponent, PropType } from 'vue';
 | 
				
			||||||
import { hasPermissions } from '@flaschengeist/api';
 | 
					import { hasPermissions } from '@flaschengeist/api';
 | 
				
			||||||
import { FG_Plugin } from '@flaschengeist/types';
 | 
					import { FG_Plugin } from '@flaschengeist/types';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,12 +43,12 @@ export default defineComponent({
 | 
				
			||||||
  emits: {
 | 
					  emits: {
 | 
				
			||||||
    addShortCut: (val: FG_Plugin.MenuLink) => val.link,
 | 
					    addShortCut: (val: FG_Plugin.MenuLink) => val.link,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  setup(props, { emit }) {
 | 
					  setup(_, { emit }) {
 | 
				
			||||||
    function isGranted(val: FG_Plugin.MenuLink) {
 | 
					    function isGranted(val: FG_Plugin.MenuLink) {
 | 
				
			||||||
      return computed(() => hasPermissions(val.permissions || [])).value;
 | 
					      return hasPermissions(val.permissions || []);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    function getTitle(entry: FG_Plugin.MenuLink) {
 | 
					    function getTitle(entry: FG_Plugin.MenuLink) {
 | 
				
			||||||
      return computed(() => (typeof entry.title === 'function' ? entry.title() : entry.title)).value;
 | 
					      return typeof entry.title === 'function' ? entry.title() : entry.title;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function addShortCut(val: FG_Plugin.MenuLink) {
 | 
					    function addShortCut(val: FG_Plugin.MenuLink) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue