setRef()

in index.js [30:41]


  setRef(element) {
    const { innerRef } = this.props;
    if (!innerRef) {
      this.webchatRef = element;
    } else if (innerRef && innerRef.constructor && innerRef.call && innerRef.apply) {
      // if this is true, innerRef is a function and thus it's a callback ref
      this.webchatRef = element;
      innerRef(element);
    } else {
      innerRef.current = element;
    }
  }