Adjust showLabels to be parsed as boolean

This commit is contained in:
Bjarne Fyrstenborg
2021-03-22 18:15:39 +01:00
committed by Nathan Woulfe
parent d6a27d6646
commit e67d59a789

View File

@@ -11,8 +11,8 @@ function booleanEditorController($scope) {
showLabels: false
};
if ($scope.model.config && $scope.model.config.showLabels && Object.toBoolean($scope.model.config.showLabels)) {
config.showLabels = true;
if ($scope.model.config) {
$scope.model.config.showLabels = $scope.model.config.showLabels ? Object.toBoolean($scope.model.config.showLabels) : config.showLabels;
}
// Map the user config