version-service
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -43,5 +43,4 @@ 'use strict'; | ||
return (0, _isomorphicFetch2.default)(this._url, { cache: 'no-cache', mode: 'no-cors' }).then(function (response) { | ||
if (response.status !== 200) { | ||
console.log('Looks like there was a problem. Status Code: ' + response.status); | ||
return undefined; | ||
if (!response.ok) { | ||
throw Error(response.statusText); | ||
} | ||
@@ -84,2 +83,3 @@ return response.json().then(function (body) { | ||
if (_this2._callback) { | ||
console.log('hello'); | ||
_this2._callback(version); | ||
@@ -90,2 +90,6 @@ } else { | ||
} | ||
}, function (error) { | ||
console.log('hello error'); | ||
_this2.start(); | ||
return error; | ||
}); | ||
@@ -92,0 +96,0 @@ }, this._timeout); |
{ | ||
"name": "version-service", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./build/version.js", |
12858
378