diff --git a/lib/plugins/endpoint-methods/method.js b/lib/plugins/endpoint-methods/method.js index 747c9f67..d230ba07 100644 --- a/lib/plugins/endpoint-methods/method.js +++ b/lib/plugins/endpoint-methods/method.js @@ -8,7 +8,7 @@ const validate = require('./validate') function apiMethod (octokit, endpointDefaults, endpointParams, options, callback) { // Do not alter passed options (#786) - options = clone(options) + options = clone(options) || {} // lowercase header names (#760) options.headers = mapKeys(options.headers, (value, key) => key.toLowerCase())