fix: check curStuff.value
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
// @ts-expect-error remove pwa
|
||||
import { useRegisterSW } from 'virtual:pwa-register/vue'
|
||||
|
||||
const {
|
||||
|
||||
@@ -21,8 +21,9 @@ export const useRecipeStore = defineStore('recipe', () => {
|
||||
const curMode = useStorage<SearchMode>(`${namespace}:mode`, 'loose')
|
||||
|
||||
function toggleStuff(name: string) {
|
||||
if (!curStuff)
|
||||
if (!curStuff.value)
|
||||
return
|
||||
|
||||
if (curStuff.value.has(name))
|
||||
curStuff.value.delete(name)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user