Skip to content

Commit

Permalink
Merge pull request #771 from opentable/oc-template-react-fix
Browse files Browse the repository at this point in the history
[DX-277] Pass the templates down to the client via the registry
  • Loading branch information
matteofigus authored Nov 28, 2017
2 parents 07d9f04 + 94280a8 commit b6bc041
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/registry/routes/helpers/get-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const urlBuilder = require('../../domain/url-builder');
const validator = require('../../domain/validators');

module.exports = function(conf, repository) {
const client = new Client(),
const client = new Client({ templates: conf.templates }),
cache = new Cache({
verbose: !!conf.verbosity,
refreshInterval: conf.refreshInterval
Expand Down Expand Up @@ -293,7 +293,9 @@ module.exports = function(conf, repository) {
})
});
} else {
const cacheKey = `${component.name}/${component.version}/template.js`;
const cacheKey = `${component.name}/${
component.version
}/template.js`;
const cached = cache.get('file-contents', cacheKey);
const key = component.oc.files.template.hashKey;
const renderOptions = {
Expand Down

0 comments on commit b6bc041

Please sign in to comment.