Skip to content

Commit

Permalink
complied sources
Browse files Browse the repository at this point in the history
  • Loading branch information
ezraroi committed Aug 9, 2016
1 parent 9beaaf0 commit 8ac4768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions dist/swissSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if (this.value === undefined) {
this.value = localStorageService.get(this.name);
}
if (this.storageDuration) {
if (this.storageDuration && this.storageDuration !== 0) {
var setDate = localStorageService.get(this.name + setTimePostFix);
if (setDate && moment(setDate).add(this.storageDuration) < moment()) {
$log.debug('AbstractField: will clear ' + this.name + ' stored value as duration since ' +
Expand All @@ -67,9 +67,11 @@
if (!this.validate(value)) {
throw 'Invalid value: ' + value;
}
localStorageService.set(this.name, value);
if (this.storageDuration) {
localStorageService.set(this.name + setTimePostFix, new Date());
if (this.storageDuration !== 0) {
localStorageService.set(this.name, value);
if (this.storageDuration) {
localStorageService.set(this.name + setTimePostFix, new Date());
}
}
this.value = value;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/swissSettings.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ac4768

Please sign in to comment.