fix reload

This commit is contained in:
Ruben Fiszel
2023-12-07 18:32:00 +01:00
parent 18a4479932
commit cb098182db
2 changed files with 1 additions and 8 deletions
@@ -296,11 +296,7 @@
{#if !noEditor}
<div class="border-t">
{#key forceReload}
<FlowModuleScript
on:reload={() => reload(flowModule)}
path={flowModule.value.path}
hash={flowModule.value.hash}
/>
<FlowModuleScript path={flowModule.value.path} hash={flowModule.value.hash} />
{/key}
</div>
{/if}
@@ -4,7 +4,6 @@
import { ScriptService } from '$lib/gen'
import { getScriptByPath } from '$lib/scripts'
import { workspaceStore } from '$lib/stores'
import { createEventDispatcher } from 'svelte'
export let path: string
export let hash: string | undefined = undefined
@@ -13,7 +12,6 @@
let language: SupportedLanguage
let notFound = false
const dispatch = createEventDispatcher()
async function loadCode(path: string, hash: string | undefined) {
try {
notFound = false
@@ -22,7 +20,6 @@
: await getScriptByPath(path!)
code = script.content
language = script.language
dispatch('reload')
} catch (e) {
notFound = true
console.error(e)