Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Fix #113: Impossible to turn off validation error alert #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dvuckovic
Copy link

Issue #113 stems from a faulty assignment in the plugin installer:

    // show alert or not?
    formDI.validationErrorShowAlert = properties.validationErrorShowAlert || true

This will always default to true value in case properties.validationErrorShowAlert is "falsy".

We can fix this by checking if the option was defined first, and assign the default only if it wasn't.

     // show alert or not?
-    formDI.validationErrorShowAlert = properties.validationErrorShowAlert || true
+    formDI.validationErrorShowAlert = typeof properties.validationErrorShowAlert !== 'undefined'
+        ? Boolean(properties.validationErrorShowAlert)
+        : true

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant