Skip to content

Commit

Permalink
Update all dependencies and types and move to GitHub action (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Jul 13, 2021
1 parent 033faf8 commit 3cd3ac0
Show file tree
Hide file tree
Showing 7 changed files with 13,018 additions and 2,433 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 15
uses: actions/setup-node@v1
with:
node-version: 15.x
- run: npm install
- run: npm test
env:
CI: true
10 changes: 5 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,17 @@ class Service extends AdapterService {
return this.db(params)
.insert(data, returning)
.then(rows => {
let id
let id;

if (data[this.id] !== undefined) {
id = data[this.id]
id = data[this.id];
} else if (!returning.length) {
id = rows[0]
id = rows[0];
} else if (rows[0] && rows[0][this.id]) {
id = rows[0][this.id]
id = rows[0][this.id];
}

if (!id) return rows
if (!id) return rows;

return this._get(id, params);
})
Expand Down
Loading

0 comments on commit 3cd3ac0

Please sign in to comment.