diff --git a/client/helpers/form.js b/client/helpers/form.js index 0c817857..b839b9c1 100644 --- a/client/helpers/form.js +++ b/client/helpers/form.js @@ -18,9 +18,9 @@ export const FormObjToJSON = function(o, fn){ export function createFormBackend(backend_available, backend_data){ if(!backend_available) return {}; + else if(!backend_available[backend_data.type]) return {}; let template = JSON.parse(JSON.stringify(backend_available[backend_data.type])); - for(let key in backend_data){ if(key in template){ template[key].value = backend_data[key]; diff --git a/client/pages/connectpage.js b/client/pages/connectpage.js index 91766c95..29859fdc 100644 --- a/client/pages/connectpage.js +++ b/client/pages/connectpage.js @@ -3,12 +3,13 @@ import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import './connectpage.scss'; import { Session } from '../model/'; -import { Container, NgIf, NgShow, Loader, Notification } from '../components/'; +import { Container, NgIf, NgShow, Loader, Notification, ErrorPage } from '../components/'; import { ForkMe, RememberMe, Credentials, Form } from './connectpage/'; import { cache, notify, urlParams } from '../helpers/'; import { Alert } from '../components/'; +@ErrorPage export class ConnectPage extends React.Component { constructor(props){ super(props); @@ -84,6 +85,10 @@ export class ConnectPage extends React.Component { } } + onError(err){ + this.props.error(err); + } + render() { return (