Post Tags - link color gives PHP error if post untagged
Description
When using the Post Tags block and setting a link color, the front end gives PHP errors, when a post is untagged:
Notice: Undefined offset: 0 in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\gutenberg\lib\block-supports\elements.php on line 47
Notice: Trying to access array offset on value of type null in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\gutenberg\lib\block-supports\elements.php on line 47
Notice: Undefined offset: 0 in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\gutenberg\lib\block-supports\elements.php on line 59
Notice: Trying to access array offset on value of type null in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\gutenberg\lib\block-supports\elements.php on line 59
Looks like trying to add the wp-elements-xxxxx class to a non-existant Post Tag block.
I think the error would also surface for the Post Categories block, if it wasn't for the fact that when a post is uncategorized, the Post Categories block is rendered as 'Uncategorized'.
Step-by-step reproduction instructions
- In Site Editor add the Post Tags block to a template such as index.html
- Select a link color for the Post Tags block
- View front end and notice the error when any of the posts are untagged.
Screenshots, screen recording, code snippet



Environment info
WP 5.8.1 Gutenberg 11.7 Theme TT1-Blocks
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes