Skip to content
Snippets Groups Projects
Commit 747acd02 authored by tamaina's avatar tamaina
Browse files

use toRaw?

parent b3ccfa86
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ function loadFile() {
async function applyRegistry(id: string) {
if (!registries) return;
const registry = structuredClone(registries[id]);
const registry = registries[id];
const { canceled: cancel1 } = await os.confirm({
type: 'warning',
......
import { onUnmounted, Ref, ref, watch } from 'vue';
import { onUnmounted, Ref, ref, toRaw, watch } from 'vue';
import { $i } from './account';
import { api } from './os';
import { get, set } from './scripts/idb-proxy';
......@@ -153,7 +153,7 @@ export class Storage<T extends StateDef> {
public set<K extends keyof T>(key: K, value: T[K]['default']): Promise<void> {
// IndexedDBやBroadcastChannelで扱うために単純なオブジェクトにする
// (JSON.parse(JSON.stringify(value))の代わり)
const rawValue = structuredClone(value);
const rawValue = structuredClone(toRaw(value));
if (_DEV_) console.log('set', key, rawValue, value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment