mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 16:02:14 +00:00
fix reload
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user