diff --git a/package.json b/package.json index 77e72328c..bfb70dd42 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "simple-get": "^3.0.3" }, "devDependencies": { - "@types/node": "^10.12.18", + "@types/node": "^14.11.10", "assert-rejects": "^1.0.0", "dtslint": "^4.0.7", "express": "^4.16.3", diff --git a/src/Canvas.cc b/src/Canvas.cc index 0cfe750d6..179ca7c69 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -114,7 +114,7 @@ NAN_METHOD(Canvas::New) { else if (0 == strcmp("svg", *Nan::Utf8String(info[2]))) backend = new SvgBackend(width, height); else - backend = new ImageBackend(width, height); + return Nan::ThrowRangeError("Unknown canvas type"); } else backend = new ImageBackend(width, height);