Skip to content

Commit

Permalink
changed type detection in get-key (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Alexander authored Jan 31, 2020
1 parent 3b214e5 commit 4116b88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/-private/utils/get-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ let _serializeParams = function(params={}, prefix) {
.map((key) => {
const value = params[key];

if (params.constructor === Array) {
if (Array.isArray(params)) {
key = `${prefix}[]`;
} else if (params.constructor === Object) {
} else if (params === Object(params)) {
key = (prefix ? `${prefix}[${key}]` : key);
}

Expand Down

0 comments on commit 4116b88

Please sign in to comment.