rest-on-couch-client
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -30,2 +30,5 @@ import axios from 'axios'; | ||
this.url = config.url; | ||
if (this.url.startsWith('/') && typeof window === 'object') { | ||
this.url = `${window.location.origin}${this.url}`; | ||
} | ||
this.request = createAxios(this.url); | ||
@@ -32,0 +35,0 @@ this.dbUrl = new URL(`db/${config.database}/`, config.url).href; |
@@ -32,2 +32,5 @@ "use strict"; | ||
this.url = config.url; | ||
if (this.url.startsWith('/') && typeof window === 'object') { | ||
this.url = `${window.location.origin}${this.url}`; | ||
} | ||
this.request = createAxios(this.url); | ||
@@ -34,0 +37,0 @@ this.dbUrl = new URL(`db/${config.database}/`, config.url).href; |
{ | ||
"name": "rest-on-couch-client", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A nodejs / browser client for rest-on-couch backend", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
212153
4800