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

Commit

Permalink
Get element before accessing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
toirl committed Sep 30, 2016
1 parent 5996ef1 commit 0bb2665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formbar/static/js/formbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,14 @@ var form = function (inputFilter, ruleEngine) {
*
*/
var toggleConditional = function (result, divId, rule) {
var element = $("#" + divId);
if (result) {
element.addClass("active");
element.removeClass("inactive");
} else {
element.addClass("inactive");
element.removeClass("active");
}
var element = $("#" + divId);
if (element.hasClass("readonly")){
handleReadOnly(result, element);
} else {
Expand Down

0 comments on commit 0bb2665

Please sign in to comment.