Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Support single-valued compound keys
Javascript is a bit unsuprisingly forgiving when passing array of string instead of a string: ```js const obj = {id: 1} Object.hasOwnProperty(obj, "a"); // returns true as expected. Object.hasOwnProperty(obj, ["a"]); // Also returns true (!) obj["id"] // returns 1 as expected. obj[["id"]] // also returns 1 (!) ``` This commit makes sure to check typeof keyPath before passing it to getOwn() (alias for `(x, a) => Object.prototype.getOwnProperty.call(x, a))``
- Loading branch information