Skip to content

Commit

Permalink
Use lodash/has to simplify key check
Browse files Browse the repository at this point in the history
  • Loading branch information
luyangkenneth committed Mar 15, 2019
1 parent 83a451c commit 9475633
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const walkSync = require('walk-sync');

const _ = {};
_.difference = require('lodash/difference');
_.has = require('lodash/has');
_.isBoolean = require('lodash/isBoolean');
_.isUndefined = require('lodash/isUndefined');
_.noop = require('lodash/noop');
Expand Down Expand Up @@ -856,7 +857,7 @@ Site.prototype.copyFontAwesomeAsset = function () {
Site.prototype.copyMarkBindAsset = function () {
const maybeOverrideDefaultBootstrapTheme = () => {
const { theme } = this.siteConfig;
if (!theme || !Object.prototype.hasOwnProperty.call(SUPPORTED_THEMES_PATHS, theme)) {
if (!theme || !_.has(SUPPORTED_THEMES_PATHS, theme)) {
return _.noop;
}

Expand Down

0 comments on commit 9475633

Please sign in to comment.