We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f01260a commit 818e157Copy full SHA for 818e157
1 file changed
third_party/ref-napi/lib/ref.js
@@ -4,10 +4,9 @@ const inspect = require('util').inspect;
4
const debug = require('debug')('ref');
5
const os = require('os');
6
// native_loader.js is an ES module (default export). When required from CJS,
7
-// Node returns the module namespace, so unwrap the default export.
+// Node returns the module namespace, so read the default export.
8
const nativeLoader = require('../../../lib/native_loader.js');
9
-const addon =
10
- nativeLoader && nativeLoader.default ? nativeLoader.default : nativeLoader;
+const addon = nativeLoader.default;
11
12
if (!addon || !addon.ref) {
13
throw new Error('Failed to load ref bindings from rclnodejs addon');
0 commit comments