mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-09 10:22:33 +08:00
fix true handling from query
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user