fix(editor): Polyfill Array.prototype.toSorted (no-chanhelog) (#13463)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-02-24 13:11:25 +01:00
committed by GitHub
parent d277e0ba0e
commit f2b15ea086
4 changed files with 46 additions and 14 deletions

View File

@@ -46,6 +46,7 @@
"@vue-flow/node-resizer": "^1.4.0",
"@vueuse/components": "^10.11.0",
"@vueuse/core": "catalog:frontend",
"array.prototype.tosorted": "1.1.4",
"axios": "catalog:",
"bowser": "2.11.0",
"change-case": "^5.4.4",

View File

@@ -1,7 +1,8 @@
<script setup lang="ts">
import '@/polyfills';
import { ref, computed, watch, onMounted, onBeforeUnmount, nextTick } from 'vue';
import { useRoute } from 'vue-router';
import { v4 as uuid } from 'uuid';
import LoadingView from '@/views/LoadingView.vue';
import BannerStack from '@/components/banners/BannerStack.vue';
import AskAssistantChat from '@/components/AskAssistant/AskAssistantChat.vue';
@@ -18,11 +19,6 @@ import { useSettingsStore } from '@/stores/settings.store';
import { useHistoryHelper } from '@/composables/useHistoryHelper';
import { useStyles } from './composables/useStyles';
// Polyfill crypto.randomUUID
if (!('randomUUID' in crypto)) {
Object.defineProperty(crypto, 'randomUUID', { value: uuid });
}
const route = useRoute();
const rootStore = useRootStore();
const assistantStore = useAssistantStore();

View File

@@ -0,0 +1,7 @@
import 'array.prototype.tosorted';
import { v4 as uuid } from 'uuid';
// Polyfill crypto.randomUUID
if (!('randomUUID' in crypto)) {
Object.defineProperty(crypto, 'randomUUID', { value: uuid });
}