Skip to content

Commit

Permalink
Merge pull request #281 from vbhayden/update-hash-module-import-struc…
Browse files Browse the repository at this point in the history
…ture

Updating node-object-hash Import for Strict Mode Support
  • Loading branch information
Lomilar authored Sep 27, 2023
2 parents 83fc1cb + 3dff40f commit 8f857bf
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 8f857bf

Please sign in to comment.