Commit d68d1bc3 authored by Fabien Amarger's avatar Fabien Amarger
Browse files

fix(ViewWrapper): Do not bug if VIEW_ENTRYPOINT is not defined for the view

parent 3ce6bde5a5ce
Pipeline #50852 passed with stages
in 1 minute and 14 seconds
......@@ -21,8 +21,15 @@ export class ViewWrapper {
if (this._VIEW_ENTRYPOINT === undefined) {
fetchViewData()
.then((viewData) => {
this._VIEW_ENTRYPOINT = viewData.VIEW_ENTRYPOINT;
resolve(this._VIEW_ENTRYPOINT);
if (viewData.VIEW_ENTRYPOINT !== undefined) {
this._VIEW_ENTRYPOINT = viewData.VIEW_ENTRYPOINT;
resolve(this._VIEW_ENTRYPOINT as View);
} else {
console.error(
`There is no VIEW_ENTRYPOINT for the view {viewData.name} ({viewData.url})`
);
reject();
}
})
.catch((e) => {
console.error('Error fetching view data : ', e);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment