From 9766c6c33df9c532b2c265fae1e55637643ee2bd Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Wed, 15 Dec 2021 11:31:06 +0100 Subject: [PATCH] src: make the module Context aware --- src/addon.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/addon.cpp b/src/addon.cpp index ddfe132e..b46087ca 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -9,4 +9,8 @@ void init_all(Local target) { CardReader::init(target); } +#if NODE_MAJOR_VERSION >= 10 +NAN_MODULE_WORKER_ENABLED(pcsclite, init_all) +#else NODE_MODULE(pcsclite, init_all) +#endif