Skip to content

Commit

Permalink
fix: do not throw if using deprecated Octokit default export without …
Browse files Browse the repository at this point in the history
…options
  • Loading branch information
gr2m committed Feb 3, 2020
1 parent 865433a commit dec7334
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -21,7 +21,9 @@ const OctokitRest = Octokit.plugin(CORE_PLUGINS);
function DeprecatedOctokit(options) {
/* istanbul ignore next */
const warn =
options.log && options.log.warn ? options.log.warn : console.warn;
options && options.log && options.log.warn
? options.log.warn
: console.warn;
warn(
'[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead'
);
Expand Down

0 comments on commit dec7334

Please sign in to comment.