Skip to content

Commit 5a80919

Browse files
committed
Nuffed the callback args for error handling
1 parent 0945bb8 commit 5a80919

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ReleaseNotes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* Trying to work around [this issue](https://github.com/Microsoft/azure-pipelines-tasks/issues/4958) in publishing releases
1+
Helps when your error handling is looking at the error argument to the callback...

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "golang-wasm-async-loader",
3-
"version": "0.2.6",
3+
"version": "0.3.0",
44
"description": "Golang WebAssembly loader for webpack that generates an async pattern for working with Go's WebAssembly output",
55
"main": "dist/index.js",
66
"scripts": {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ function loader(this: webpack.loader.LoaderContext, contents: string) {
7979
const outFile = `${this.resourcePath}.wasm`;
8080
const args = ["build", "-o", outFile, this.resourcePath];
8181

82-
execFile(goBin, args, opts, (_, err) => {
82+
execFile(goBin, args, opts, (err) => {
8383
if (err) {
84-
cb(new Error(err));
84+
cb(err);
8585
return;
8686
}
8787

0 commit comments

Comments
 (0)