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

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

Closed
wants to merge 2 commits into from
Closed

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

wants to merge 2 commits into 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

@wolfnetics wolfnetics closed this by deleting the head repository Dec 10, 2024
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.

2 participants