diff --git a/.changelog/1155.txt b/.changelog/1155.txt new file mode 100644 index 000000000..d2572b3df --- /dev/null +++ b/.changelog/1155.txt @@ -0,0 +1,3 @@ +```release-note:bug +workers: correctly set `body` value for non-ES module uploads +``` diff --git a/workers.go b/workers.go index d5474bc03..b1b3ed7f5 100644 --- a/workers.go +++ b/workers.go @@ -214,10 +214,10 @@ func (api *API) UploadWorker(ctx context.Context, rc *ResourceContainer, params return WorkerScriptResponse{}, ErrMissingAccountID } + body := []byte(params.Script) var ( contentType = "application/javascript" err error - body []byte ) if params.Module || len(params.Bindings) > 0 {