Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hasLayout(layoutType): Promise {
if (utils.isRDLEmbed(this.report.config.embedUrl)) {
return Promise.reject(errors.APINotSupportedForRDLError);
}
let layoutTypeEnum = models.LayoutType[layoutType];
return this.report.service.hpm.get(`/report/pages/${this.name}/layoutTypes/${layoutTypeEnum}`, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)
.then(response => response.body,
response => {
throw response.body;
});
}
}