Skip to content

Commit

Permalink
refactor: move check into processGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Nov 27, 2023
1 parent dbd6066 commit 8ded31d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lib/edge-functions/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ export class EdgeFunctionsRegistry {
throw new Error('Build error')
}

if (this.functions.length === 0) {
return { warnings }
}

this.buildError = null

// We use one index to loop over both internal and user function, because we know that this.#functions has internalFunctions first.
Expand Down Expand Up @@ -408,7 +404,9 @@ export class EdgeFunctionsRegistry {
*/
private processGraph(graph: ModuleGraph | undefined) {
if (!graph) {
warn('Could not process edge functions dependency graph. Live reload will not be available.')
if (this.functions.length !== 0) {
warn('Could not process edge functions dependency graph. Live reload will not be available.')
}

return
}
Expand Down

0 comments on commit 8ded31d

Please sign in to comment.