Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #289 from emattias/bug-avoidCrashingWithCreateCont…
Browse files Browse the repository at this point in the history
…ainer

Support props not being and object when using createContainer
  • Loading branch information
boygirl authored Aug 14, 2017
2 parents ae1b970 + 413b69d commit e047bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/victory-container/victory-container.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import PropTypes from "prop-types";
import { assign, omit, defaults, uniqueId } from "lodash";
import { assign, omit, defaults, uniqueId, isObject } from "lodash";
import Portal from "../victory-portal/portal";
import Timer from "../victory-util/timer";

Expand Down Expand Up @@ -46,7 +46,7 @@ export default class VictoryContainer extends React.Component {
constructor(props) {
super(props);
this.getTimer = this.getTimer.bind(this);
this.containerId = typeof props.containerId === "undefined" ?
this.containerId = !(isObject(props) && typeof props.containerId === "undefined") ?
uniqueId("victory-container-") : props.containerId;
}

Expand Down

0 comments on commit e047bda

Please sign in to comment.