{"action":"created","issue":{"url":"https://api.github.com/repos/lishengzxc/vue-sweetalert/issues/13","repository_url":"https://api.github.com/repos/lishengzxc/vue-sweetalert","labels_url":"https://api.github.com/repos/lishengzxc/vue-sweetalert/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/lishengzxc/vue-sweetalert/issues/13/comments","events_url":"https://api.github.com/repos/lishengzxc/vue-sweetalert/issues/13/events","html_url":"https://github.com/lishengzxc/vue-sweetalert/issues/13","id":249378368,"number":13,"title":"Uncaught (in promise) TypeError: Cannot read property '$swal' of undefined","user":{"login":"ranaclyde","id":19784573,"avatar_url":"https://avatars2.githubusercontent.com/u/19784573?v=4","gravatar_id":"","url":"https://api.github.com/users/ranaclyde","html_url":"https://github.com/ranaclyde","followers_url":"https://api.github.com/users/ranaclyde/followers","following_url":"https://api.github.com/users/ranaclyde/following{/other_user}","gists_url":"https://api.github.com/users/ranaclyde/gists{/gist_id}","starred_url":"https://api.github.com/users/ranaclyde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranaclyde/subscriptions","organizations_url":"https://api.github.com/users/ranaclyde/orgs","repos_url":"https://api.github.com/users/ranaclyde/repos","events_url":"https://api.github.com/users/ranaclyde/events{/privacy}","received_events_url":"https://api.github.com/users/ranaclyde/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-10T15:05:35Z","updated_at":"2017-10-03T15:30:17Z","closed_at":"2017-08-10T17:45:56Z","author_association":"NONE","body":"This error occurs (in then or catch) when I run two nested sweetalerts\r\n\r\n```\r\n      this.$swal({\r\n        title: 'Are you sure?',\r\n        text: 'You will not be able to recover this imaginary file!',\r\n        type: 'warning',\r\n        showCancelButton: true,\r\n        confirmButtonText: 'Yes, delete it!',\r\n        cancelButtonText: 'No, keep it'\r\n      }).then(function () {\r\n        this.$swal(\r\n          'Deleted!',\r\n          'Your imaginary file has been deleted.',\r\n          'success'\r\n        )\r\n      }, function (dismiss) {\r\n        // dismiss can be 'overlay', 'cancel', 'close', 'esc', 'timer'\r\n        if (dismiss === 'cancel') {\r\n          this.$swal(\r\n            'Cancelled',\r\n            'Your imaginary file is safe :)',\r\n            'error'\r\n          )\r\n        }\r\n      })\r\n```\r\n\r\nsome help?"},"comment":{"url":"https://api.github.com/repos/lishengzxc/vue-sweetalert/issues/comments/333879667","html_url":"https://github.com/lishengzxc/vue-sweetalert/issues/13#issuecomment-333879667","issue_url":"https://api.github.com/repos/lishengzxc/vue-sweetalert/issues/13","id":333879667,"user":{"login":"ranaclyde","id":19784573,"avatar_url":"https://avatars2.githubusercontent.com/u/19784573?v=4","gravatar_id":"","url":"https://api.github.com/users/ranaclyde","html_url":"https://github.com/ranaclyde","followers_url":"https://api.github.com/users/ranaclyde/followers","following_url":"https://api.github.com/users/ranaclyde/following{/other_user}","gists_url":"https://api.github.com/users/ranaclyde/gists{/gist_id}","starred_url":"https://api.github.com/users/ranaclyde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranaclyde/subscriptions","organizations_url":"https://api.github.com/users/ranaclyde/orgs","repos_url":"https://api.github.com/users/ranaclyde/repos","events_url":"https://api.github.com/users/ranaclyde/events{/privacy}","received_events_url":"https://api.github.com/users/ranaclyde/received_events","type":"User","site_admin":false},"created_at":"2017-10-03T15:30:17Z","updated_at":"2017-10-03T15:30:17Z","author_association":"NONE","body":"It has to do with the scope of the variables"}}
{"actor":{"display_login":"ranaclyde"}}