Improve function name.

pull/21833/head
Richard Lewis 2017-11-10 10:17:55 +00:00
parent 98ac3dd19b
commit bd6b5c4498
1 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ export default React.createClass({
* @param {Object} newProps The new properties of the component * @param {Object} newProps The new properties of the component
* @return {Object} Updated component state to be set with setState * @return {Object} Updated component state to be set with setState
*/ */
_getNewUrlState(newProps) { _getNewState(newProps) {
const widgetPermissionId = [newProps.room.roomId, encodeURIComponent(newProps.url)].join('_'); const widgetPermissionId = [newProps.room.roomId, encodeURIComponent(newProps.url)].join('_');
const hasPermissionToLoad = localStorage.getItem(widgetPermissionId); const hasPermissionToLoad = localStorage.getItem(widgetPermissionId);
return { return {
@ -79,7 +79,7 @@ export default React.createClass({
}, },
getInitialState() { getInitialState() {
return this._getNewUrlState(this.props); return this._getNewState(this.props);
}, },
/** /**
@ -176,7 +176,7 @@ export default React.createClass({
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
if (nextProps.url !== this.props.url) { if (nextProps.url !== this.props.url) {
this._getNewUrlState(nextProps); this._getNewState(nextProps);
this.setScalarToken(); this.setScalarToken();
} else if (nextProps.show && !this.props.show) { } else if (nextProps.show && !this.props.show) {
this.setState({ this.setState({