alga-news-sdk
Advanced tools
Comparing version 1.9.4 to 1.9.5
@@ -52,6 +52,7 @@ "use strict"; | ||
var API_URL, QUERY; | ||
return __generator(this, function (_a) { | ||
var _a; | ||
return __generator(this, function (_b) { | ||
API_URL = utils_1.parseApiUrl('/posts'); | ||
QUERY = ''; | ||
if (query.sort.length !== 2) | ||
if (((_a = query === null || query === void 0 ? void 0 : query.sort) === null || _a === void 0 ? void 0 : _a.length) !== 2) | ||
throw 'A propriedade sort precisa ser um array com 2 itens'; | ||
@@ -58,0 +59,0 @@ if (query === null || query === void 0 ? void 0 : query.page) |
{ | ||
"name": "alga-news-sdk", | ||
"version": "1.9.4", | ||
"version": "1.9.5", | ||
"description": "SDK para aplicações que envolvem API da AlgaNews em React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,1 @@ | ||
import { type } from 'os'; | ||
import { AlgaNews, Post } from '../interfaces'; | ||
@@ -16,3 +15,3 @@ import { Http, parseApiUrl } from '../utils' | ||
if (query.sort.length !== 2) | ||
if (query?.sort?.length !== 2) | ||
throw 'A propriedade sort precisa ser um array com 2 itens' | ||
@@ -19,0 +18,0 @@ |
269945