gridstack / gridstack.js

Build interactive dashboards in minutes.
https://gridstackjs.com
MIT License
6.68k stars 1.28k forks source link

Bugfix: prevent throwing error when node.grid is undefined (drag item from outside the grid) #2698

Closed adrianbenjuya closed 3 months ago

adrianbenjuya commented 3 months ago

Description

I added an extra nullcheck before performing the key event callback. If n or n.grid aren't defined then just return.

Checklist

adumesny commented 3 months ago

thanks. the real fix would handle null grid (dragginbg from outside) case for #2695