We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
stringify
undefined
1 parent 1072d57 commit 691e739Copy full SHA for 691e739
lib/stringify.js
@@ -133,7 +133,7 @@ module.exports = function (object, opts) {
133
var obj = object;
134
var options = opts ? utils.assign({}, opts) : {};
135
136
- if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
+ if (options.encoder !== null && typeof options.encoder !== 'undefined' && typeof options.encoder !== 'function') {
137
throw new TypeError('Encoder has to be a function.');
138
}
139
0 commit comments