Skip to content

Commit

Permalink
Fix #1924 (#1925)
Browse files Browse the repository at this point in the history
Should check if JSVM enabled before loading JS files
  • Loading branch information
buger committed Oct 2, 2018
1 parent 15ce78a commit 523bf87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func processSpec(spec *APISpec, apisByListen map[string]int,

mwPaths, mwAuthCheckFunc, mwPreFuncs, mwPostFuncs, mwPostAuthCheckFuncs, mwDriver = loadCustomMiddleware(spec)

if mwDriver == apidef.OttoDriver {
if config.Global().EnableJSVM && mwDriver == apidef.OttoDriver {
spec.JSVM.LoadJSPaths(mwPaths, prefix)
}

Expand Down

0 comments on commit 523bf87

Please sign in to comment.