Skip to content

Commit

Permalink
adding catch for 3.0 hash module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
adl-trey committed Sep 15, 2023
1 parent 92eaf2c commit 3dff40f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/server/profile/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ if (!envHttp2)
global.axios = require("axios"); //Pre-empt http2 use.
}
require("cassproject");
global.hasher = require('node-object-hash');

const hashModuleRoot = require("node-object-hash");

// Newer versions of this library moved the function to a property
//
if (typeof hashModuleRoot !== "function")
global.hasher = hashModuleRoot.hasher;
else
global.hasher = hashModuleRoot;

const envHttps = process.env.HTTPS != null ? process.env.HTTPS.trim() == 'true' : false;

Expand Down

0 comments on commit 3dff40f

Please sign in to comment.