{"action":"created","issue":{"url":"https://api.github.com/repos/KleeGroup/focus-components/issues/578","labels_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/578/labels{/name}","comments_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/578/comments","events_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/578/events","html_url":"https://github.com/KleeGroup/focus-components/issues/578","id":112343513,"number":578,"title":"\"cannot read property 'indexOf' of undefined ","user":{"login":"Pandakls","id":7700690,"avatar_url":"https://avatars.githubusercontent.com/u/7700690?v=3","gravatar_id":"","url":"https://api.github.com/users/Pandakls","html_url":"https://github.com/Pandakls","followers_url":"https://api.github.com/users/Pandakls/followers","following_url":"https://api.github.com/users/Pandakls/following{/other_user}","gists_url":"https://api.github.com/users/Pandakls/gists{/gist_id}","starred_url":"https://api.github.com/users/Pandakls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pandakls/subscriptions","organizations_url":"https://api.github.com/users/Pandakls/orgs","repos_url":"https://api.github.com/users/Pandakls/repos","events_url":"https://api.github.com/users/Pandakls/events{/privacy}","received_events_url":"https://api.github.com/users/Pandakls/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T11:07:31Z","updated_at":"2015-10-20T12:38:46Z","closed_at":null,"body":"I just try to render a page without significative modification on it and I get this error from nowhere with a gigantic stacktrace : \r\n![image](https://cloud.githubusercontent.com/assets/7700690/10605340/da351ec6-772a-11e5-9d18-7fd25f69cdb9.png)\r\n![image](https://cloud.githubusercontent.com/assets/7700690/10605347/ea2a9e46-772a-11e5-81b9-69858d311cdc.png)\r\n\r\nWhere getAllJustificatif is a service that i havn't changed for a while getting a static list of objects.\r\nI tried to get into the vendor.js code but i'm lost at the first third of the stack trace.\r\n\r\nHere's few of the code : \r\n#1 the index calling the service : \r\n```javascript\r\n//Store et service\r\nconst storeList = require('stores/justificatifsList');\r\nconst serviceList = require('../../../services').administration.getAllJustificatif;\r\n//Component\r\nlet mixinTrad = FocusComponents.common.i18n.mixin;\r\nlet Popin = Focus.components.application.popin.component;\r\nlet Block = Focus.components.common.block.component;\r\nlet JustificatifLine = require('./justificatifLine');\r\nlet EditJustificatifView = require('./justificatifDetail');\r\nconst SmartList = FocusComponents.page.list.component;\r\nlet Button = Focus.components.common.button.action.component;\r\nconst Icon = FocusComponents.common.icon.component;\r\n\r\nmodule.exports = React.createClass({\r\n    mixins: [mixinTrad],\r\n    displayName: 'Justificatif',\r\n    getInitialState() {\r\n        return {};\r\n    },\r\n    _getListPageProps() {\r\n        let listePage = this;\r\n        return {\r\n            onLineClick(line) {\r\n                listePage.setState({\r\n                    currentParamId: line.tyjId\r\n                }, listePage.refs.editPopin.toggleOpen);\r\n            },\r\n            lineComponent: JustificatifLine,\r\n            store: storeList,\r\n            service: serviceList\r\n        };\r\n    },\r\n    refresh() {\r\n        return this.refs.paramRefList._action.load();\r\n    },\r\n    _openPopin(){\r\n        this.refs.editPopin.toggleOpen();\r\n        this.setState({\r\n            needToBeLoaded: false,\r\n            currentParamId: null\r\n        });\r\n    },\r\n    render(){\r\n        const {currentParamId} = this.state;\r\n        let {needToBeLoaded} = this.state;\r\n        if(currentParamId !== null){\r\n            needToBeLoaded = true;\r\n        }\r\n        return (\r\n            <Block title='administration.justificatif'>\r\n                <td>\r\n                    <button className='mdl-button mdl-js-button' onClick={this._openPopin}>\r\n\t                    <Icon name='add_circle_outline'/>\r\n                        <span>{this.i18n('administration.ajoutJustif')}</span>\r\n\t                </button>\r\n                </td>\r\n                <SmartList ref='paramRefList' {...this._getListPageProps()} />\r\n\r\n                <Popin ref='editPopin' type='from-right'>\r\n                    <EditJustificatifView id={currentParamId} isEdit={true} hasLoad={needToBeLoaded} refresh={this.refresh}/>\r\n                </Popin>\r\n            </Block>\r\n        );\r\n    }\r\n});\r\n```\r\n#2 The Line of jutificatifs\r\n```javascript\r\nlet Button = Focus.components.common.button.action.component;\r\nconst Icon = FocusComponents.common.icon.component;\r\nconst {column: Column, grid: Grid} = FocusComponents.common;\r\n\r\nlet delServices = require('../../../services').administration.delTypeJustificatif;\r\n\r\n//Creates a line for the component.\r\nmodule.exports = React.createClass({\r\n    mixins: [FocusComponents.list.table.line.mixin],\r\n    definitionPath: \"typeJustificatif\",\r\n    _editHandler() {\r\n        this.props.onLineClick(this.props.data);\r\n    },\r\n    _deleteHandler(){\r\n        delServices(this.props.id);\r\n    },\r\n    renderLineContent: function(data){\r\n        return (\r\n            <tr className='hoverButton'>\r\n                <td>{this.textFor('libelle')}</td>\r\n                <td>{this.textFor('description')}</td>\r\n                <td>{this.textFor('actif')}</td>\r\n                <td>\r\n                    <button className='mdl-button mdl-js-button' onClick={this._editHandler}>\r\n                        <Icon name='create'/>\r\n                    </button>\r\n                    <button className='mdl-button mdl-js-button' onClick={this._deleteHandler}>\r\n                        <Icon name='remove_circle_outline'/>\r\n                    </button>\r\n                </td>\r\n            </tr>\r\n        );\r\n    }\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/KleeGroup/focus-components/issues/comments/149552137","html_url":"https://github.com/KleeGroup/focus-components/issues/578#issuecomment-149552137","issue_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/578","id":149552137,"user":{"login":"Pandakls","id":7700690,"avatar_url":"https://avatars.githubusercontent.com/u/7700690?v=3","gravatar_id":"","url":"https://api.github.com/users/Pandakls","html_url":"https://github.com/Pandakls","followers_url":"https://api.github.com/users/Pandakls/followers","following_url":"https://api.github.com/users/Pandakls/following{/other_user}","gists_url":"https://api.github.com/users/Pandakls/gists{/gist_id}","starred_url":"https://api.github.com/users/Pandakls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pandakls/subscriptions","organizations_url":"https://api.github.com/users/Pandakls/orgs","repos_url":"https://api.github.com/users/Pandakls/repos","events_url":"https://api.github.com/users/Pandakls/events{/privacy}","received_events_url":"https://api.github.com/users/Pandakls/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T12:38:45Z","updated_at":"2015-10-20T12:38:45Z","body":"Ok! It's just the test on 'Value ?' before the this.i18n : the value given is a boolen called by a \"textFor\".\r\n\r\nThe test should be : value !== undefined ? .... "}}