diff --git a/js/releases/index.js b/js/releases/index.js index 1f9cdeb4a1..b6f40c0f16 100644 --- a/js/releases/index.js +++ b/js/releases/index.js @@ -59,9 +59,9 @@ class Releases { * @memberof SentryReleases */ setCommits(release, options) { - if (!options || !options.repo || (!options.auto && !options.commit)) { + if (!options || (!options.auto && (!options.repo || !options.commit))) { throw new Error( - 'options.repo, and either options.commit or options.auto must be specified' + 'options.auto, or options.repo and options.commit must be specified' ); }