Skip to content

Commit

Permalink
- fix remove cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumepotier committed Jun 5, 2018
1 parent 77e8935 commit 760c019
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/basil.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
};

// Add some isType methods: isArguments, isBoolean, isFunction, isString, isArray, isNumber, isDate, isRegExp, isUndefined, isNull.
// Add some isType methods: isArguments, isBoolean, isFunction, isString, isArray, isNumber, isDate, isRegExp, isUndefined, isNull.
var types = ['Arguments', 'Boolean', 'Function', 'String', 'Array', 'Number', 'Date', 'RegExp', 'Undefined', 'Null'];
for (var i = 0; i < types.length; i++) {
Basil.utils['is' + types[i]] = (function (type) {
Expand Down Expand Up @@ -260,7 +260,7 @@
this.set(key, '', { expireDays: -1 });
// remove cookie from upper domains
var domainParts = document.domain.split('.');
for (var i = domainParts.length; i >= 0; i--) {
for (var i = domainParts.length; i > 1; i--) {
this.set(key, '', { expireDays: -1, domain: '.' + domainParts.slice(- i).join('.') });
}
},
Expand Down
2 changes: 1 addition & 1 deletion build/basil.min.js

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

2 changes: 1 addition & 1 deletion src/basil.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
this.set(key, '', { expireDays: -1 });
// remove cookie from upper domains
var domainParts = document.domain.split('.');
for (var i = domainParts.length; i >= 0; i--) {
for (var i = domainParts.length; i > 1; i--) {
this.set(key, '', { expireDays: -1, domain: '.' + domainParts.slice(- i).join('.') });
}
},
Expand Down

0 comments on commit 760c019

Please sign in to comment.