Skip to content

Commit

Permalink
fix: remove extraneous dot in URL transform (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Jul 27, 2022
1 parent ef329c1 commit 296f945
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,9 @@ const zitiFetch = async ( url, opts ) => {

} else if ( (url.match( regexSlash )) || ((url.match( regexDotSlash ))) ) { // the request starts with a slash, or dot-slash

// let isExpired = await zitiBrowzerRuntime.zitiContext.isCertExpired();
if ( url.match( regexDotSlash ) ) {
url = url.slice(1); // remove the 'dot'
}

let newUrl;
let baseURIUrl = new URL( document.baseURI );
Expand Down Expand Up @@ -598,7 +600,7 @@ const zitiFetch = async ( url, opts ) => {
opts.serviceName = serviceName;

/**
* Let ziti-bbrowzer-core.context do the needful
* Let ziti-browzer-core.context do the needful
*/
var zitiResponse = await zitiBrowzerRuntime.zitiContext.httpFetch( url, opts);

Expand Down Expand Up @@ -650,9 +652,10 @@ const zitiFetch = async ( url, opts ) => {

}).catch(( err ) => {
zitiBrowzerRuntime.logger.error(err);
return new Promise( async (_, reject) => {
reject( err );
});
// return new Promise( async (_, reject) => {
// reject( err );
// });
return undefined;
});

return response;
Expand Down

0 comments on commit 296f945

Please sign in to comment.