Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
josecarlosweb authored Jan 2, 2021
1 parent 55a0d23 commit d3de3c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ function D (cons, opts) {

if (opts.weak !== false && !opts.proto) {
if (!weak) {
weak = require("weak-napi")
if (parseInt(process.version.substr(1)) < 6) {
weak = require("weak")
}
else {
weak = require("weak-napi")
}
}

opts.proto = {};
Expand Down

0 comments on commit d3de3c8

Please sign in to comment.