Changeset 247 for trunk/common

Show
Ignore:
Timestamp:
11/26/07 18:57:32 (2 years ago)
Author:
ydnar
Message:

bugid:60472; fix for cookie toggling in IE

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/common/Cookie.js

    r159 r247  
    7878     */ 
    7979    bake: function( value ) { 
    80         if( !defined( this.name ) || this.name == null || 
    81             ( ( !defined( this.value ) || this.value == null ) && ( !defined( value ) || value == null ) ) ) 
    82         return undefined; 
    83          
     80        if( !exists( this.name ) ) 
     81                return undefined; 
     82                 
     83        if( exists( value ) ) 
     84            this.value = value; 
     85        else  
     86            value = this.value; 
     87                 
    8488        var name = escape( this.name ); 
    85  
    86         if ( !defined( value ) || value == null )  
    87             value = this.value; 
    88         else  
    89             this.value = value; 
    90  
    9189        value = escape( value ); 
    9290