Skip to content

Commit 1e676ff

Browse files
committed
Fix lodash imports (#136).
1 parent d6a9484 commit 1e676ff

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/rsg-components/Editor/Editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import '../../utils/codemirror-jsx';
33
import 'codemirror/lib/codemirror.css';
44

5-
import _ from 'lodash';
65
import { Component, PropTypes } from 'react';
76
import debounce from 'lodash/debounce';
7+
import merge from 'lodash/merge';
88
import Codemirror from 'react-codemirror';
99

1010
import s from './Editor.css';
@@ -49,7 +49,7 @@ export default class Editor extends Component {
4949

5050
render() {
5151
let { highlightTheme } = this.props;
52-
let options = _.merge({}, Editor.codemirrorOptions, {theme: highlightTheme});
52+
let options = merge({}, Editor.codemirrorOptions, {theme: highlightTheme});
5353

5454
return (
5555
<div className={s.root}>

src/utils/config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var findup = require('findup');
44
var semverUtils = require('semver-utils');
55
var minimist = require('minimist');
66
var prettyjson = require('prettyjson');
7-
var _ = require('lodash');
7+
var merge = require('lodash/merge');
88
var utils = require('./server');
99

1010
var CONFIG_FILENAME = 'styleguide.config.js';
@@ -68,8 +68,8 @@ function readConfig() {
6868
}
6969
}
7070

71-
options = _.merge({}, DEFAULT_CONFIG, options);
72-
options = _.merge({}, options, {
71+
options = merge({}, DEFAULT_CONFIG, options);
72+
options = merge({}, options, {
7373
verbose: !!argv.verbose,
7474
configDir: configDir,
7575
assetsDir: assetsDir,
@@ -127,7 +127,7 @@ function validateConfig(options) {
127127
if (!options.components && !options.sections) {
128128
throw Error('Styleguidist: "components" or "sections" option is required.');
129129
}
130-
if (options.sections && !_.isArray(options.sections)) {
130+
if (options.sections && !Array.isArray(options.sections)) {
131131
throw Error('Styleguidist: "sections" option must be an array.');
132132
}
133133
if (options.getExampleFilename && typeof options.getExampleFilename !== 'function') {

0 commit comments

Comments
 (0)