Skip to content

Commit

Permalink
fix: correct error conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
keplersj committed Dec 24, 2019
1 parent b0b0054 commit b3840b1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions gatsby-node.ts
Expand Up @@ -19,22 +19,19 @@ export const onPostBuild: GatsbyNode["onPostBuild"] = async (
const options = pluginOptions as PluginOptions;

if (!pluginOptions) {
args.reporter.error(
throw new Error(
"No options passed to gatsby-plugin-verify-brave! Please see usage in package README."
);
return;
}
if (pluginOptions?.token) {
args.reporter.error(
if (!pluginOptions.token) {
throw new Error(
"No `token` passed to gatsby-plugin-brave! Please see usage in package README."
);
return;
}
if (pluginOptions?.domain) {
args.reporter.error(
if (!pluginOptions.domain) {
throw new Error(
"No `domain` passed to gatsby-plugin-brave! Please see usage in package README."
);
return;
}

const content = stripIndent`
Expand Down

0 comments on commit b3840b1

Please sign in to comment.