diff --git a/src/lib/components/translater.svelte b/src/lib/components/translater.svelte index a46e8f0..a0ac16a 100644 --- a/src/lib/components/translater.svelte +++ b/src/lib/components/translater.svelte @@ -15,7 +15,6 @@ import Search from "$lib/components/Search.svelte"; import { hideTranslated, searchQuerry } from "$lib/stores/filter"; import { filterDescription } from "$lib/filter"; -import type { log } from 'util'; // import type { } from "tinymce"; export let file; @@ -220,7 +219,16 @@ import type { log } from 'util'; let _hideTranslated = $hideTranslated; $: { - if (loaded && (_hideTranslated !== $hideTranslated || _searchQuerry !== $searchQuerry)) { + + if(_searchQuerry === '') console.log('null'); + console.log('_search', _searchQuerry); + console.log('$search', $searchQuerry); + + console.log('##################################'); + + if (loaded && (_hideTranslated !== $hideTranslated || _searchQuerry !== $searchQuerry || _searchQuerry === '')) { + console.log('intern', _searchQuerry); + _hideTranslated = $hideTranslated items = items.map((item) => { item.hidden = filterDescription({ diff --git a/src/lib/cookie.ts b/src/lib/cookie.ts index abdb854..9df165f 100644 --- a/src/lib/cookie.ts +++ b/src/lib/cookie.ts @@ -14,7 +14,6 @@ export function setCookie(cname, cvalue, exdays) { export function readCookie(request) { try { const cookies = {}; - if (!request.headers.cookie) return ''; request.headers.cookie.split(';').forEach(function(cookie) { const parts = cookie.match(/(.*?)=(.*)$/) cookies[ parts[1].trim() ] = (parts[2] || '').trim();