mirror of https://github.com/rancher/api-ui.git
Don't blow up if collectionMethods/reosurceMethods are missing
This commit is contained in:
parent
8cf81bb9cb
commit
f4fe4e5642
|
|
@ -394,7 +394,7 @@ HTMLApi.prototype.operationInit = function(cb)
|
|||
|
||||
if ( schema )
|
||||
{
|
||||
var methods = ( type == 'collection' ? schema.collectionMethods : schema.resourceMethods );
|
||||
var methods = ( type == 'collection' ? schema.collectionMethods : schema.resourceMethods ) || [];
|
||||
var order = {'POST': 1, 'PUT': 2, 'DELETE': 3}
|
||||
methods.sort(function(a,b) {
|
||||
var ia = order[a];
|
||||
|
|
|
|||
Loading…
Reference in New Issue