refactor/code-splitting #31
@@ -117,6 +117,11 @@ export abstract class BaseFontStore<TParams extends Record<string, any>> {
|
|||||||
return this.result.isError;
|
return this.result.isError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The error from the last failed fetch, or null if no error. */
|
||||||
|
get error(): Error | null {
|
||||||
|
return this.result.error ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
/** Whether no fonts are loaded (not loading and empty array) */
|
/** Whether no fonts are loaded (not loading and empty array) */
|
||||||
get isEmpty() {
|
get isEmpty() {
|
||||||
return !this.isLoading && this.fonts.length === 0;
|
return !this.isLoading && this.fonts.length === 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user