Skip to content

Commit

Permalink
Fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 14, 2016
1 parent 092c45c commit 20acf42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class Client {
* @throws {Error} The API key or blog URL is empty.
*/
_fetch(endPoint, params) {
if (!this.apiKey.length || !this.blog) throw new Error('The API key or the blog URL is empty.');
if (!this.apiKey.length || !this.blog) return Observable.throw(new Error('The API key or the blog URL is empty.'));

let bodyParams = Object.assign(this.blog.toJSON(), params);
if (this.test) bodyParams.is_test = '1';
Expand Down

0 comments on commit 20acf42

Please sign in to comment.