FriendsOfFlarum/ban-ips

Javascript error when unbanning "only current" IP

Opened this issue · 0 comments

When I unban an IP and select "Only unban current IP" via the admin panel, a javascript error is thrown and the modal is stuck in loading mode. The IP is correctly deleted from the database.

Chrome shows:

Uncaught TypeError: Cannot read property 'banned_ips' of undefined

Firefox shows:

TypeError: this.user.data.relationships is undefined

The error appears to originate from here https://github.com/FriendsOfFlarum/ban-ips/blob/master/js/src/common/components/UnbanIPModal.js#L154