Skip to content

Commit

Permalink
Add an emit event for tweet failure and success
Browse files Browse the repository at this point in the history
  • Loading branch information
dkapila committed Jan 14, 2021
1 parent c4a8195 commit 8e93b7a
Show file tree
Hide file tree
Showing 3 changed files with 14,909 additions and 26 deletions.
2 changes: 2 additions & 0 deletions dist/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ var twitterEmbedComponent = function twitterEmbedComponent(me) {
},
render: function render(h) {
if (this.isLoaded && this.isAvailable) {
this.$emit('tweet-loaded-success');
return h('div', {
class: this.$props.widgetClass
});
}

if (this.isLoaded && !this.isAvailable && this.$props.errorMessage) {
this.$emit('tweet-loaded-failure');
var $errorMsg = h('div', {
class: this.$props.errorMessageClass,
domProps: {
Expand Down
Loading

0 comments on commit 8e93b7a

Please sign in to comment.