The code tries to check for that case, but #items isn't set at all then, causing a PHP fatal error. It also hardcodes the field name, so that needs to move up.
This even happens when slider isn't enabled because above it also doesn't correctly check for having or not having a slider configured.
Active
1.0
Code