When using these two configurations I get an JS error in the console: Uncaught TypeError: data.value.split is not a function
[
'label' => esc_html__( 'Zoom', 'static-map' ),
'attr' => 'zoom',
'type' => 'select',
'options' => range( 1, 22 ),
],
[
'label' => esc_html__( 'Zoom', 'static-map' ),
'attr' => 'zoom',
'type' => 'select',
'options' => array_combine( range( 0, 22 ), range( 0, 22 ) ),
],
The reason for this is that the data.value has a typeof number instead of string in these cases.
If I change the code to the following it works fine.
[
'label' => esc_html__( 'Zoom', 'static-map' ),
'attr' => 'zoom',
'type' => 'select',
'options' => array_combine( range( 1, 22 ), range( 1, 22 ) ),
],
Related change #745
When using these two configurations I get an JS error in the console:
Uncaught TypeError: data.value.split is not a functionThe reason for this is that the
data.valuehas atypeofnumber instead of string in these cases.If I change the code to the following it works fine.
Related change #745