{"action":"created","issue":{"url":"https://api.github.com/repos/schiehll/react-alert/issues/35","repository_url":"https://api.github.com/repos/schiehll/react-alert","labels_url":"https://api.github.com/repos/schiehll/react-alert/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/schiehll/react-alert/issues/35/comments","events_url":"https://api.github.com/repos/schiehll/react-alert/issues/35/events","html_url":"https://github.com/schiehll/react-alert/issues/35","id":244938429,"node_id":"MDU6SXNzdWUyNDQ5Mzg0Mjk=","number":35,"title":"Unhandled Rejection (TypeError): Cannot read property 'show' of undefined","user":{"login":"ProductOfAmerica","id":14712114,"node_id":"MDQ6VXNlcjE0NzEyMTE0","avatar_url":"https://avatars3.githubusercontent.com/u/14712114?v=4","gravatar_id":"","url":"https://api.github.com/users/ProductOfAmerica","html_url":"https://github.com/ProductOfAmerica","followers_url":"https://api.github.com/users/ProductOfAmerica/followers","following_url":"https://api.github.com/users/ProductOfAmerica/following{/other_user}","gists_url":"https://api.github.com/users/ProductOfAmerica/gists{/gist_id}","starred_url":"https://api.github.com/users/ProductOfAmerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProductOfAmerica/subscriptions","organizations_url":"https://api.github.com/users/ProductOfAmerica/orgs","repos_url":"https://api.github.com/users/ProductOfAmerica/repos","events_url":"https://api.github.com/users/ProductOfAmerica/events{/privacy}","received_events_url":"https://api.github.com/users/ProductOfAmerica/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-07-23T21:47:11Z","updated_at":"2018-07-31T17:55:30Z","closed_at":"2017-07-28T14:04:41Z","author_association":"NONE","body":"Upon following the guide on the front page I get this error: `Unhandled Rejection (TypeError): Cannot read property 'show' of undefined`. I'm not sure how msg is defined or where to define it. Anything helps."},"comment":{"url":"https://api.github.com/repos/schiehll/react-alert/issues/comments/409311191","html_url":"https://github.com/schiehll/react-alert/issues/35#issuecomment-409311191","issue_url":"https://api.github.com/repos/schiehll/react-alert/issues/35","id":409311191,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTMxMTE5MQ==","user":{"login":"lejager","id":13634331,"node_id":"MDQ6VXNlcjEzNjM0MzMx","avatar_url":"https://avatars1.githubusercontent.com/u/13634331?v=4","gravatar_id":"","url":"https://api.github.com/users/lejager","html_url":"https://github.com/lejager","followers_url":"https://api.github.com/users/lejager/followers","following_url":"https://api.github.com/users/lejager/following{/other_user}","gists_url":"https://api.github.com/users/lejager/gists{/gist_id}","starred_url":"https://api.github.com/users/lejager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lejager/subscriptions","organizations_url":"https://api.github.com/users/lejager/orgs","repos_url":"https://api.github.com/users/lejager/repos","events_url":"https://api.github.com/users/lejager/events{/privacy}","received_events_url":"https://api.github.com/users/lejager/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T17:55:30Z","updated_at":"2018-07-31T17:55:30Z","author_association":"NONE","body":"I'm having this same issue. I get this error message when calling the alert.\r\n`VM302 2.563dabd1167c9ea261e5.js:3274 TypeError: Cannot read property 'success' of undefined`\r\n\r\nI have multiple higher order components when calling the alert.\r\n`export default withAlert(compose(\r\n  graphql(createProject, { name: 'createProjectMutation' }),\r\n  graphql(updateProject, { name: 'updateProjectMutation' }),\r\n  graphql(CollectionAndSubjectsQuery),\r\n)(ProjectFormWithData));`\r\n\r\nI call the alert prop from a function. \r\n`// On form submit, send data to graphql.\r\n  async createProject(input) {\r\n    try {\r\n      const data = await this.props.createProjectMutation({ \r\n        variables: { input },\r\n        refetchQueries: [\r\n          { query: ProjectListQuery },\r\n          { query: CollectionAndSubjectsQuery }\r\n        ]\r\n      });\r\n        const message = `Successfully created ${data.data.createProject.title}`;\r\n        this.props.alert.success(message);\r\n\r\n    } catch (err) {\r\n      console.error(err);\r\n      this.props.alert.error(\"We couldn't make your update at this time\");\r\n    };\r\n  }\r\n`\r\nHere's my alert provider set up:\r\n`import React, { Component } from 'react';\r\nimport { Provider as AlertProvider } from 'react-alert';\r\nimport AlertTemplate from 'react-alert-template-basic';\r\nimport Routes from './Routes.jsx';\r\n\r\nconst alertOptions = {\r\n  position: 'top center',\r\n  timeout: 4000,\r\n  type: 'success',\r\n  transition: 'fade',\r\n  offset: '150px',\r\n  zIndex: 999\r\n}\r\n\r\nexport default class App extends Component {\r\n\r\n  render() {\r\n    return (\r\n      <AlertProvider template={AlertTemplate} {...alertOptions}>\r\n        <Routes />\r\n      </AlertProvider>\r\n    );\r\n  }\r\n}\r\n`"}}
{"actor":{"display_login":"lejager"}}