fix: make eslint/typescript happy
📊 Benchmark the Runtime / benchmark (push) Successful in 1m10s
🚀 Lint & Test & Deploy / quality (push) Successful in 2m0s
🚀 Lint & Test & Deploy / test-unit (push) Successful in 32s
🚀 Lint & Test & Deploy / test-e2e (push) Successful in 1m46s
🚀 Lint & Test & Deploy / deploy (push) Successful in 1m48s
📊 Benchmark the Runtime / benchmark (push) Successful in 1m10s
🚀 Lint & Test & Deploy / quality (push) Successful in 2m0s
🚀 Lint & Test & Deploy / test-unit (push) Successful in 32s
🚀 Lint & Test & Deploy / test-e2e (push) Successful in 1m46s
🚀 Lint & Test & Deploy / deploy (push) Successful in 1m48s
This commit is contained in:
@@ -165,7 +165,7 @@ export class GraphState {
|
|||||||
this.edges.delete(edgeId);
|
this.edges.delete(edgeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _dirtyPositions = new Set<NodeInstance>();
|
private _dirtyPositions = new SvelteSet<NodeInstance>();
|
||||||
private _positionFlushPending = false;
|
private _positionFlushPending = false;
|
||||||
|
|
||||||
private _flushPositions() {
|
private _flushPositions() {
|
||||||
|
|||||||
@@ -136,13 +136,14 @@ export class RemoteNodeRegistry implements NodeRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async register(id: string, wasmBuffer: ArrayBuffer) {
|
async register(id: string, wasmBuffer: ArrayBuffer) {
|
||||||
let wrapper: ReturnType<typeof createWasmWrapper> = null!;
|
const wrapper = (() => {
|
||||||
try {
|
try {
|
||||||
wrapper = createWasmWrapper(wasmBuffer);
|
return createWasmWrapper(wasmBuffer);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Failed to create node wrapper for node: ${id}`, error);
|
console.error(`Failed to create node wrapper for node: ${id}`, error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
const rawDefinition = wrapper.get_definition();
|
const rawDefinition = wrapper.get_definition();
|
||||||
const definition = NodeDefinitionSchema.safeParse(rawDefinition);
|
const definition = NodeDefinitionSchema.safeParse(rawDefinition);
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ function getValue(input: NodeInput, value?: unknown) {
|
|||||||
if (input.type === 'select' && typeof value !== 'number') {
|
if (input.type === 'select' && typeof value !== 'number') {
|
||||||
const index = input.options?.indexOf(value as string);
|
const index = input.options?.indexOf(value as string);
|
||||||
if (index === undefined || index < 0) {
|
if (index === undefined || index < 0) {
|
||||||
throw new Error(`Unknown value ${value} for select input ${input.label}`);
|
// Defaultl to the first option
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user