Skip to content

Commit

Permalink
main: fix browser storage
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Mar 8, 2025
1 parent 1ec4152 commit 1e8c297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/files/PdfViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ import 'vue-pdf-embed/dist/styles/textLayer.css';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons';
import streamSaver from 'streamsaver';
defineEmits(['compile']);
const props = defineProps({
Expand Down Expand Up @@ -121,7 +119,7 @@ function create() {
async function download() {
if (!props.pdf) return;
const fileStream = streamSaver.createWriteStream(props.basename);
const fileStream = _o.streamSaver.createWriteStream(props.basename);
const writer = fileStream.getWriter();
await writer.write(props.pdf);
await writer.close();
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ globalThis._o = {
stats: new IDBStatsDb(),
ProjDb: IDBProjDb,

getStorageRoot: globalThis.navigator.storage.getDirectory,
getStorageRoot: () => window.navigator.storage.getDirectory(),
streamSaver: streamSaver,
};

Expand Down

0 comments on commit 1e8c297

Please sign in to comment.