fix: check curStuff.value
This commit is contained in:
@@ -10,10 +10,11 @@
|
|||||||
<meta name="description" content="好的,今天我们来做菜!">
|
<meta name="description" content="好的,今天我们来做菜!">
|
||||||
<title>隔离食用手册</title>
|
<title>隔离食用手册</title>
|
||||||
<script>
|
<script>
|
||||||
|
(function () {
|
||||||
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
||||||
for (const registration of registrations)
|
for (const registration of registrations) registration.unregister()
|
||||||
registration.unregister()
|
|
||||||
})
|
})
|
||||||
|
})()
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
// @ts-expect-error remove pwa
|
||||||
import { useRegisterSW } from 'virtual:pwa-register/vue'
|
import { useRegisterSW } from 'virtual:pwa-register/vue'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -21,8 +21,9 @@ export const useRecipeStore = defineStore('recipe', () => {
|
|||||||
const curMode = useStorage<SearchMode>(`${namespace}:mode`, 'loose')
|
const curMode = useStorage<SearchMode>(`${namespace}:mode`, 'loose')
|
||||||
|
|
||||||
function toggleStuff(name: string) {
|
function toggleStuff(name: string) {
|
||||||
if (!curStuff)
|
if (!curStuff.value)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (curStuff.value.has(name))
|
if (curStuff.value.has(name))
|
||||||
curStuff.value.delete(name)
|
curStuff.value.delete(name)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user