mauricerenck / komments

A Kirby comment plugin
MIT License
45 stars 8 forks source link

Cannot read properties of undefined (reading 'id') #30

Closed MaluNoPeleke closed 2 years ago

MaluNoPeleke commented 2 years ago

Right after installing Komments 1.3.0 on a Kirby 3.6.0-rc.4 build I get the following error message in the Panel after switching to the Komments page:

Cannot read properties of undefined (reading 'id')

This is the output of the developer console:

TypeError: Cannot read properties of undefined (reading 'id') at a.created (index.js:349) at Vt (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) at nn (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) at a.Cn._init (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) at new a (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) at /media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6 at init (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) at /media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6 at f (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) at a.patch (/media/panel/0d2fe3c1d0376b43026a4c53ad4add22/js/vendor.js:6) t.config.errorHandler @ index.js:1

This is the mentioned line in the index.js (here the third one):

        created() {
            this.kommentList = this.queuedKomments,
            this.selectKomment(this.kommentList[0].id),
            this.loadKomments()
        },

The error is gone once there are comments shown on the page.

mauricerenck commented 2 years ago

I see… This is already fixed on main but my magical great new auto release process didn't trigger a new release for my commit… This will then be included in the next release (hopefully 😆)

mauricerenck commented 2 years ago

This should be included in the latest release of the fix for issue #31

MaluNoPeleke commented 2 years ago

Can confirm