Cannot use ‘in’ operator to search for ‘table’ in undefined
-
Hi!
In latest version 1.58.0 of plugin there seems to be a bug in base/js/admin.js where it throws a JS error when trying to open up a repeater field that has no label set – Uncaught TypeError: Cannot use ‘in’ operator to search for ‘table’ in undefined
It’s these lines:
// Setup Repeater Table Header if necessary.
const itemLabel = $el.data( ‘item-label’ );
if ( ‘table’ in itemLabel ) {
if data-item-label is missing (which it may as php part is even checking if labels are set and don’t output if it’s missing) then it tries to find ‘table’ in undefined which it can’t and throws an error.
Probably an additional check is needed.For now a rollback to previous version remedied the situation.
Didn’t really do deep dig but even setting the label on repeater itself didn’t help as it wasn’t being output but it may be some mistake of mine, didn’t really investigate for now.
- The topic ‘Cannot use ‘in’ operator to search for ‘table’ in undefined’ is closed to new replies.