Commit c4be3ce6 authored by osman's avatar osman Committed by osman

Issue #2996603 by osman: Invalid JS options

parent 4b14e0f2
......@@ -53,8 +53,8 @@ function lazy_page_attachments(array &$attachments) {
$config = \Drupal::config('lazy.settings');
$options = [
'errorClass' => $config->get('errorClass'),
'loadInvisible' => $config->get('loadInvisible'),
'offset' => $config->get('offset'),
'loadInvisible' => boolval($config->get('loadInvisible')),
'offset' => intval($config->get('offset')),
'saveViewportOffsetDelay' => $config->get('saveViewportOffsetDelay'),
'selector' => '.' . $config->get('selector'),
'skipClass' => $config->get('skipClass'),
......
......@@ -171,8 +171,8 @@ class LazyForm extends ConfigFormBase {
$this->config('lazy.settings')
->set('alter_tag', $form_state->getValue('alter_tag'))
->set('errorClass', $form_state->getValue('errorClass'))
->set('loadInvisible', $form_state->getValue('loadInvisible'))
->set('offset', $form_state->getValue('offset'))
->set('loadInvisible', boolval($form_state->getValue('loadInvisible')))
->set('offset', intval($form_state->getValue('offset')))
->set('saveViewportOffsetDelay', $form_state->getValue('saveViewportOffsetDelay'))
->set('selector', $form_state->getValue('selector'))
->set('skipClass', $form_state->getValue('skipClass'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment