Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Update asset-path-manager.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Jun 25, 2017
1 parent 8ede16b commit 9b528e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/lib/asset-manager/asset-path-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const logger = require('@financial-times/n-logger').default;
const nUiManager = require('./n-ui-manager');
const linkHeaderHelperFactory = require('./link-header-helper-factory');

const readJsonHash = path => {
const loadAssetHashesJson = path => {
try {
return require(`${path}`);
} catch(err) {
Expand All @@ -14,8 +14,8 @@ const readJsonHash = path => {

module.exports = (locals, directory, useLocalAppShell) => {

const assetHashes = readJsonHash(`${directory}/public/asset-hashes.json`);
const nUiAssetHashes = readJsonHash(`${directory}/public/n-ui-asset-hashes.json`);
const assetHashes = loadAssetHashesJson(`${directory}/public/asset-hashes.json`);
const nUiAssetHashes = loadAssetHashesJson(`${directory}/public/n-ui-asset-hashes.json`);
const nUiReleaseName = nUiManager.getReleaseName(directory);
const nUiUnhashedAssetsRoot = useLocalAppShell ? '/${locals.__name}/n-ui/' : `//www.ft.com/__assets/n-ui/cached/${nUiReleaseName}/`;

Expand Down

0 comments on commit 9b528e5

Please sign in to comment.