Skip to content

Commit 35b2341

Browse files
committed
reset bug fixed
1 parent a712a83 commit 35b2341

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

www/js/modules/recipe/controllers/submit.recipe.controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ define(function () {
6666
$scope.$watchCollection(function(){
6767
return $scope.model;
6868
}, function(newVal, oldVal){
69-
if(newVal && oldVal && !$.isEmptyObject(newVal) && !$.isEmptyObject(oldVal) && oldVal != newVal) {
69+
if(newVal && oldVal && !$.isEmptyObject(newVal) && !$.isEmptyObject(oldVal) && JSON.stringify(oldVal) != JSON.stringify(newVal)) {
7070
$scope.isModified = true;
71+
} else {
72+
$scope.isModified = false;
7173
}
7274
});
7375

0 commit comments

Comments
 (0)