diff --git a/package-lock.json b/package-lock.json index c09d0b2f..febbadf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7650,12 +7650,6 @@ "integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg==", "dev": true }, - "md5-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/md5-file/-/md5-file-4.0.0.tgz", - "integrity": "sha512-UC0qFwyAjn4YdPpKaDNw6gNxRf7Mcx7jC1UGCY4boCzgvU2Aoc1mOGzTtrjjLKhM5ivsnhoKpQVxKPp+1j1qwg==", - "dev": true - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", diff --git a/package.json b/package.json index 8f7701b6..3b5d9f17 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,6 @@ "file-loader": "^2.0.0", "har-validator": "^5.1.3", "husky": "^1.1.3", - "md5-file": "^4.0.0", "mini-css-extract-plugin": "^0.5.0", "mocha": "^5.2.0", "ndb": "^1.0.26", diff --git a/server/render/renderFullPage.js b/server/render/renderFullPage.js index a35a0c1e..12e39214 100644 --- a/server/render/renderFullPage.js +++ b/server/render/renderFullPage.js @@ -1,10 +1,3 @@ -const md5File = require('md5-file'); -const path = require('path'); - -const bundlePath = path.resolve('./public/bundle/bundle.js'); -const bundleHash = md5File.sync(bundlePath); -const shortBundleHash = bundleHash.substring(0,4); - module.exports = (helmet, html, preloadedState) => { // take the html and preloadedState and return the full page return ` @@ -29,7 +22,7 @@ module.exports = (helmet, html, preloadedState) => { - + `; diff --git a/server/utils/getClaimData.js b/server/utils/getClaimData.js index e0ab2433..5e26aad4 100644 --- a/server/utils/getClaimData.js +++ b/server/utils/getClaimData.js @@ -22,7 +22,7 @@ module.exports = async (data) => { let lbrynetFileExt = null; if (!data.fileExt) { lbrynetClaimResult = await getClaim(lbrynetUri).catch(() => { return 'invalid URI' }); - lbrynetFileExt = lbrynetClaimResult && lbrynetClaimResult.file_name.split('.').slice(-1).pop(); + lbrynetFileExt = lbrynetClaimResult && lbrynetClaimResult.file_name && lbrynetClaimResult.file_name.split('.').slice(-1).pop(); } // TODO verify that "generated_x" does anything at all