Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
bug fix for setUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagogak committed Sep 26, 2017
1 parent 78dba0c commit fd36af2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Utils.js
Expand Up @@ -8,7 +8,7 @@ exports.setAuth = setAuth;
exports.assembleError = assembleError;
exports.tryJson = tryJson;
function setUrl(configuration, path) {
if (configuration.baseUrl) return configuration.baseUrl + path;else return path;
if (!configuration) return path;else if (configuration.baseUrl) return configuration.baseUrl + path;else return path;
}

function setAuth(configuration, manualAuth) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "language-http",
"version": "1.0.3",
"version": "1.0.4",
"description": "An HTTP request language package for use with Open Function",
"main": "lib/index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/Utils.js
@@ -1,5 +1,6 @@
export function setUrl(configuration, path) {
if ( configuration.baseUrl ) return configuration.baseUrl + path
if ( !configuration ) return path
else if ( configuration.baseUrl ) return configuration.baseUrl + path
else return path
}

Expand Down

0 comments on commit fd36af2

Please sign in to comment.