From 523d3b3c2b535a5003c2a631bf6d2ec342cc6c8f Mon Sep 17 00:00:00 2001 From: Lukasz Czerwinski Date: Tue, 28 Jan 2020 18:49:42 +0100 Subject: [PATCH] Fixed compile error (issue #45) - upgraded nan to >= 2.14.0 and fixed a call in FontDescriptor.h --- package-lock.json | 6 +++--- package.json | 2 +- src/FontDescriptor.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f3a25ce..5b87d64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -163,9 +163,9 @@ "dev": true }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==" + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, "once": { "version": "1.4.0", diff --git a/package.json b/package.json index 68b8b98..8393e50 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "build/Release/fontmanager", "types": "index.d.ts", "dependencies": { - "nan": ">=2.10.0" + "nan": ">=2.14.0" }, "devDependencies": { "mocha": "*" diff --git a/src/FontDescriptor.h b/src/FontDescriptor.h index 270d53e..2215ff6 100644 --- a/src/FontDescriptor.h +++ b/src/FontDescriptor.h @@ -173,7 +173,7 @@ struct FontDescriptor { MaybeLocal value = Nan::Get(obj, Nan::New(name).ToLocalChecked()); if (!value.IsEmpty() && value.ToLocalChecked()->IsBoolean()) { - return value.ToLocalChecked()->BooleanValue(Nan::GetCurrentContext()).FromJust(); + return value.ToLocalChecked()->BooleanValue((Nan::GetCurrentContext())->GetIsolate()); } return false;