theKashey / focus-lock

Gotcha! A11y util for scoping a focus.
MIT License
172 stars 17 forks source link

fix: dataset of null error #12

Closed pgarciacamou closed 4 years ago

pgarciacamou commented 4 years ago

I'm using react-focus-lock. After the upgrade of focus-lock from 0.6.6 to 0.6.7 I started seeing the following error when running the CI:

08:53:50   return node.dataset && node.dataset.focusGuard;
08:53:50               ^
08:53:50
08:53:50 TypeError: Cannot read property 'dataset' of null
08:53:50     at isGuard

After some digging, I found this: https://github.com/theKashey/focus-lock/commit/421e8690d81dbeaaa43231a1be46bd4b235a84bf#diff-ba89194e8b70f259390f3e61e05a34e1R19

I ran the test suite and I'm seeing the following with my changes:

Screen Shot 2020-04-24 at 11 13 53 AM

theKashey commented 4 years ago

:oof:

theKashey commented 4 years ago

0.6.8. released.

pgarciacamou commented 4 years ago

That was fast! Thank you @theKashey