parse extension safety, check actions
This commit is contained in:
@@ -81,9 +81,13 @@ class Extension extends Item {
|
|||||||
this.description = contentObject.description;
|
this.description = contentObject.description;
|
||||||
this.url = contentObject.url;
|
this.url = contentObject.url;
|
||||||
this.supported_types = contentObject.supported_types;
|
this.supported_types = contentObject.supported_types;
|
||||||
this.actions = contentObject.actions.map(function(action){
|
if(contentObject.actions) {
|
||||||
return new Action(action);
|
this.actions = contentObject.actions.map(function(action){
|
||||||
})
|
return new Action(action);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.actions = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFromExternalResponseItem(externalResponseItem) {
|
updateFromExternalResponseItem(externalResponseItem) {
|
||||||
|
|||||||
Reference in New Issue
Block a user