Skip to content

Commit 1e7811e

Browse files
committed
fix linting
1 parent f2b845e commit 1e7811e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

examples/svelte-kit/src/routes/+page.svelte

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
<script lang="ts">
2-
import { onDestroy, onMount } from "svelte";
2+
import { onDestroy, onMount } from "svelte";
33
4-
const container: HTMLDivElement | null = null;
5-
let NutrientViewer: typeof import("@nutrient-sdk/viewer").default | undefined;
4+
let container: HTMLDivElement | null = null;
5+
let NutrientViewer: typeof import("@nutrient-sdk/viewer").default | undefined;
66
7-
onMount(async () => {
8-
NutrientViewer = (await import("@nutrient-sdk/viewer")).default;
9-
if (container && NutrientViewer) {
10-
NutrientViewer.load({
11-
container,
12-
// you may also specify a file in public directory e.g. /document.pdf
13-
document: "https://www.nutrient.io/downloads/pspdfkit-web-demo.pdf",
14-
// baseUrl tells the SDK where to load the assets from
15-
baseUrl: `${window.location.protocol}//${window.location.host}/${import.meta.env.PUBLIC_URL ?? ""}`,
16-
});
17-
}
18-
});
7+
onMount(async () => {
8+
NutrientViewer = (await import("@nutrient-sdk/viewer")).default;
9+
if (container && NutrientViewer) {
10+
NutrientViewer.load({
11+
container,
12+
// you may also specify a file in public directory e.g. /document.pdf
13+
document: "https://www.nutrient.io/downloads/pspdfkit-web-demo.pdf",
14+
// baseUrl tells the SDK where to load the assets from
15+
baseUrl: `${window.location.protocol}//${window.location.host}/${import.meta.env.PUBLIC_URL ?? ""}`,
16+
});
17+
}
18+
});
1919
20-
onDestroy(() => {
21-
NutrientViewer?.unload(container);
22-
});
20+
onDestroy(() => {
21+
NutrientViewer?.unload(container);
22+
});
2323
</script>
2424

2525
<div class="container" bind:this={container}></div>

0 commit comments

Comments
 (0)