File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ var defaults = require( './defaults.json' );
2323*/
2424function attacher ( remark , options ) {
2525 var opts = copy ( defaults ) ;
26- if ( arguments . length > 1 ) {
26+
27+ // NOTE: cannot use `arguments.length` check, as `options` may be explicitly passed as `undefined`
28+ if ( options !== void 0 ) {
2729 if ( ! isObject ( options ) ) {
2830 throw new TypeError ( 'invalid input argument. Options argument must be an object. Value: `' + options + '`.' ) ;
2931 }
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ var defaults = require( './defaults.json' );
2323*/
2424function attacher ( remark , options ) {
2525 var opts = copy ( defaults ) ;
26- if ( options !== undefined ) {
26+
27+ // NOTE: cannot use `arguments.length` check, as `options` may be explicitly passed as `undefined`
28+ if ( options !== void 0 ) {
2729 if ( ! isObject ( options ) ) {
2830 throw new TypeError ( 'invalid input argument. Options argument must be an object. Value: `' + options + '`.' ) ;
2931 }
You can’t perform that action at this time.
0 commit comments