Skip to content

Commit

Permalink
fix: allow other json values (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
samzilverberg authored Mar 22, 2022
1 parent f582a09 commit eb045bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1349,13 +1349,11 @@ export default class Options {
__Note #2__: This option is not enumerable and will not be merged with the instance defaults.
*/
get json(): Record<string, any> | undefined {
get json(): any {
return this._internals.json;
}

set json(value: Record<string, any> | undefined) {
assert.any([is.object, is.undefined], value);

set json(value: any) {
if (value !== undefined) {
assert.undefined(this._internals.body);
assert.undefined(this._internals.form);
Expand Down

0 comments on commit eb045bf

Please sign in to comment.