Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
Allow to bypass zero offsets (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogaldh committed Jun 14, 2019
1 parent 6e1e9bd commit f580fc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulms/events",
"version": "0.1.0",
"version": "0.1.1",
"description": "JavaScript API-client for uLMS Events service",
"files": [
"es",
Expand Down
6 changes: 3 additions & 3 deletions src/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class HttpEventsResource {
const { offset } = params
let qs = ''

if (offset) {
if (!isNaN(offset)) {
qs = `?offset=${offset}`
}

Expand All @@ -48,11 +48,11 @@ export class HttpEventsResource {

qsParts.push(`direction=${direction}`)

if (after) {
if (!isNaN(after)) {
qsParts.push(`after=${after}`)
}

if (before) {
if (!isNaN(before)) {
qsParts.push(`before=${before}`)
}

Expand Down

0 comments on commit f580fc2

Please sign in to comment.