Ox.api: handle missing 'options' argument

This commit is contained in:
rolux 2012-12-18 15:04:22 +01:00
parent 69506bde92
commit c27dc129ce

View file

@ -165,6 +165,8 @@ Ox.api <f> Turns an array into a list API
@*/ @*/
Ox.api = function(items, options) { Ox.api = function(items, options) {
options = options || {};
var api = { var api = {
cache: options.cache, cache: options.cache,
enums: options.enums ? parseEnums(options.enums) : {}, enums: options.enums ? parseEnums(options.enums) : {},