0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-03 08:02:12 +01:00
gitea/web_src/js/modules/stores.ts

12 lines
368 B
TypeScript
Raw Normal View History

import {reactive} from 'vue';
import type {Reactive} from 'vue';
let diffTreeStoreReactive: Reactive<Record<string, any>>;
export function diffTreeStore() {
if (!diffTreeStoreReactive) {
diffTreeStoreReactive = reactive(window.config.pageData.diffFileInfo);
window.config.pageData.diffFileInfo = diffTreeStoreReactive;
}
return diffTreeStoreReactive;
}