Changeset 8894

Show
Ignore:
Timestamp:
04/29/08 17:07:43 (5 months ago)
Author:
hannes
Message:

* Make properties argument to Storable constructor optional.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/minibase/trunk/demo/model.js

    r8893 r8894  
    2727                        and only settable on transient objects 
    2828     */ 
    29     return new db.Storable(this, properties || {}); 
     29    return new db.Storable(this, properties); 
    3030} 
    3131 
  • sandbox/minibase/trunk/modules/helma/minibase.js

    r8884 r8894  
    88 * 
    99 * @param object the raw javascript object to wrap 
    10  * @param properties the persistent object properties 
     10 * @param properties the persistent object properties (optional) 
    1111 */ 
    1212function Storable(object, properties) { 
     
    1616    if (!(object.constructor instanceof Function)) 
    1717        throw new Error("object must have a constructor property, has: "  + object.constructor); 
     18    if (properties === undefined) 
     19        properties = {}; 
    1820    if (!(properties instanceof Object)) 
    1921        throw new Error("properties must be an object, was: " + properties);