Skip to content

Commit

Permalink
Merge pull request kodadot#674 from roiLeo/fix/History/undefined
Browse files Browse the repository at this point in the history
fix(history): undefined on create
  • Loading branch information
vikiival authored Sep 1, 2021
2 parents c0bbec1 + 9a27bbe commit 2e5b23d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/components/rmrk/Gallery/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,10 @@ export default class History extends Vue {
protected priceData: any = [];
// protected eventData: Date[] = [];
public async created() {
this.createTable();
}
protected createTable() {
let prevOwner: string = '';
let curPrice: string = '0.0000000';
for (const newEvent of this.events) {
const event: any = {};
Expand Down Expand Up @@ -162,9 +159,10 @@ export default class History extends Vue {
}
@Watch('events')
async watchEvent(newEvent: [], oldEvent: []) {
// console.log(this.events)
this.createTable();
public async watchEvent() {
if (this.events) {
this.createTable();
}
}
}
</script>
Expand Down

0 comments on commit 2e5b23d

Please sign in to comment.