We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e59985c commit e931e63Copy full SHA for e931e63
packages/@css-blocks/core/src/BlockParser/BlockFactory.ts
@@ -106,7 +106,13 @@ export class BlockFactory {
106
}
107
108
getBlock(identifier: FileIdentifier): Promise<Block> {
109
- if (this.promises[identifier]) { return this.promises[identifier]; }
+ if (this.promises[identifier]) {
110
+ return this.promises[identifier].catch(() => {
111
+ // If we got an error last time, try again.
112
+ // Also this makes sure that the error object gives a correct import stack trace.
113
+ return this._getBlockPromise(identifier);
114
+ });
115
+ }
116
return this._getBlockPromise(identifier);
117
118
0 commit comments