Skip to content

Commit

Permalink
Bugfix: resolving "toString" name causes a crush
Browse files Browse the repository at this point in the history
  • Loading branch information
kahless committed Mar 17, 2018
1 parent 0ba5fec commit 0024cdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import crypto from 'crypto';
import os from 'os';
import path from 'path';
import has from 'lodash/has';

import globals from 'globals';
import semver from 'semver';
Expand Down Expand Up @@ -291,11 +292,12 @@ export default class Configuration {
}

resolveAlias(variableName: string): ?string {
let importPath = this.get('aliases')[variableName];
if (!importPath) {
if (!has(this.get('aliases'), variableName)) {
return null;
}

let importPath = this.get('aliases')[variableName];

importPath = importPath.path || importPath; // path may be an object

if (this.pathToCurrentFile !== './') {
Expand Down

0 comments on commit 0024cdc

Please sign in to comment.