fix: check curStuff.value
This commit is contained in:
@@ -10,10 +10,11 @@
|
||||
<meta name="description" content="好的,今天我们来做菜!">
|
||||
<title>隔离食用手册</title>
|
||||
<script>
|
||||
(function () {
|
||||
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
||||
for (const registration of registrations)
|
||||
registration.unregister()
|
||||
})
|
||||
for (const registration of registrations) registration.unregister()
|
||||
})
|
||||
})()
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
@@ -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