diff --git a/knockout.dirtyFlag.js b/knockout.dirtyFlag.js index f979447..45f4b9e 100644 --- a/knockout.dirtyFlag.js +++ b/knockout.dirtyFlag.js @@ -35,13 +35,12 @@ hashFunction = hashFunction || ko.toJSON; var + self = this, _objectToTrack = objectToTrack, _lastCleanState = ko.observable(hashFunction(_objectToTrack)), _isInitiallyDirty = ko.observable(isInitiallyDirty), result = function () { - var self = this; - self.forceDirty = function () { _isInitiallyDirty(true); @@ -55,10 +54,9 @@ _lastCleanState(hashFunction(_objectToTrack)); _isInitiallyDirty(false); }; - return self; }; - + return result; }; })(ko);