check for content

This commit is contained in:
Mads Rasmussen
2023-12-08 14:39:37 +01:00
parent f20357a4e9
commit cede027e0e

View File

@@ -112,13 +112,10 @@ export class UmbStylesheetWorkspaceContext
}
async sendContentGetRules() {
if (!this.getData()?.content) return;
const content = this.getData()?.content;
if (!content) throw Error('No content');
const requestBody = {
content: this.getData()?.content,
};
const { data } = await this.repository.extractStylesheetRules(requestBody);
const { data } = await this.repository.extractStylesheetRules({ content });
this.setRules(data?.rules ?? []);
}