diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 7739983..70f9d1b 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -202,10 +202,16 @@ var hashData = $location.search(); for (var key in hashData) { + // handle false if (hashData[key] === 'false') { hashData[key] = false; } + // handle true + if ((hashData[key] === 'true' || hashData[key] === '') && typeof $scope.data[key] === 'boolean') { + hashData[key] = true; + } + if ($scope.data[key] !== undefined && typeof $scope.data[key] === typeof hashData[key]) { $scope.isDirty = true; $scope.data[key] = hashData[key];