0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

Fix ES6 template string

should be ${...} not @{...}
This commit is contained in:
Bart Dubois 2017-05-21 22:50:11 +02:00
parent 8927d7d144
commit f8dc1da537

View file

@ -88,13 +88,13 @@ function validate_metadata(object, name) {
* @return {String} base registry url * @return {String} base registry url
*/ */
function combineBaseUrl(protocol, host, prefix) { function combineBaseUrl(protocol, host, prefix) {
let result = '@{protocol}://@{host}'; let result = '${protocol}://${host}';
if (prefix) { if (prefix) {
prefix = prefix.replace(/\/$/, ''); prefix = prefix.replace(/\/$/, '');
result = (prefix.indexOf('/') === 0) result = (prefix.indexOf('/') === 0)
? '@{result}@{prefix}' ? '${result}${prefix}'
: prefix; : prefix;
} }