Importing Editor results in TypeError
darman96 opened this issue · comments
I get following error as soon as I import { Editor }
in my svelte component:
Uncaught TypeError: Cannot read property 'length' of undefined
at LineOp.js:15
at LineOp.js:16
at main.ts:5
I created a new svelte project with npx degit sveltejs/template my-svelte-project
and ran the setupTypeScript.sh script.
This is my code:
<!-- RichEditor.svelte -->
<script lang="ts">
import { Editor } from 'typewriter-editor';
</script>
<div class="text-content">
<h2>Test</h2>
</div>
<!-- App.svelte -->
<script lang="ts">
import RichEditor from "./RichEditor.svelte";
</script>
<main>
<RichEditor />
</main>
// main.ts
import App from './App.svelte';
const app = new App({
target: document.body
});
export default app;
Fixed in v0.6.34