fix code quality issues

This commit is contained in:
まっちゃとーにゅ 2024-02-07 00:36:30 +09:00
parent 52cee46ef6
commit 86405fc0bd
No known key found for this signature in database
GPG Key ID: 143DE582A97FE052
2 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { inject, onBeforeUnmount, provide, ref, shallowRef, computed, nextTick } from 'vue';
import { IRouter, Resolved, RouteDef } from '@/nirax.js';
import { IRouter, Resolved } from '@/nirax.js';
import { defaultStore } from '@/store.js';
import { globalEvents } from '@/events.js';
import MkLoadingPage from '@/pages/_loading_.vue';
@ -76,7 +76,7 @@ router.addListener('change', onChange);
/**
* キャッシュクリアが有効になったら全キャッシュをクリアする
*
*
* keepAlive側にwatcherがあるのですぐ消えるとはおもうけど念のためページ遷移完了まではキャッシュを無効化しておく
* キャッシュ有効時向けにexcludeを使いたい場合はpageCacheControllerに並列に突っ込むのではなく下に追記すること
*/

View File

@ -18,9 +18,9 @@ export async function getTheme(mode: 'light' | 'dark', getName = false): Promise
if (theme.base) {
const base = [lightTheme, darkTheme].find(x => x.id === theme.base);
if (base && base.codeHighlighter) theme.codeHighlighter = Object.assign({}, base.codeHighlighter, theme.codeHighlighter);
if (base?.codeHighlighter) theme.codeHighlighter = { ...base.codeHighlighter, ...theme.codeHighlighter };
}
if (theme.codeHighlighter) {
let _res: ThemeRegistration = {};
if (theme.codeHighlighter.base === '_none_') {
@ -55,7 +55,7 @@ export async function getHighlighter(): Promise<Highlighter> {
export async function initHighlighter() {
const aiScriptGrammar = await import('aiscript-vscode/aiscript/syntaxes/aiscript.tmLanguage.json');
await loadWasm(import('shiki/onig.wasm?init'));
// テーマの重複を消す