Skip to content

Commit a2161ae

Browse files
committed
Fix empty cookie set by wysihtml5
1 parent 3f7fa48 commit a2161ae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

third_party/wysihtml5/wysihtml5-0.4.0pre.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -5583,7 +5583,14 @@ wysihtml5.dom.replaceWithChildNodes = function(node) {
55835583
* this._unset(document, "cookie", "", true);
55845584
*/
55855585
_unset: function(object, property, value, setter) {
5586-
try { object[property] = value; } catch(e) {}
5586+
if (property != 'cookie') {
5587+
// TODO: The following line sets a cookie with an empty name in
5588+
// Chrome 54 and breaks all the other cookies set by the app.
5589+
// The if clause is a temproray fix that will unblock users, but
5590+
// we need to find a better solution (Upgrade the lib to 5.X or
5591+
// replacing it altogether). - Anze
5592+
try { object[property] = value; } catch(e) {}
5593+
}
55875594

55885595
try { object.__defineGetter__(property, function() { return value; }); } catch(e) {}
55895596
if (setter) {

0 commit comments

Comments
 (0)