Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit 8caecad

Browse files
authored
Merge pull request #37 from atlc/master
Prevent from modifying data.length property in the event a single resource is requested to avoid mutating object properties.
2 parents 22706ec + a95a4fa commit 8caecad

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ router.render = (req, res) => {
4545
if (data.constructor === Array) {
4646
data.length = Math.min(Math.min(query.limit, data.length), maxLimit)
4747
}
48-
} else {
49-
data.length = Math.min(defaultLimit, data.length)
5048
}
5149
res.jsonp(data)
5250
}

0 commit comments

Comments
 (0)