@antelopejs/dms-frontend 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1201,12 +1201,17 @@ export function trackDmsAsyncComponents(app: App): Set<string> {
|
|
|
1201
1201
|
* a process-wide hook registry and only unregisters there, so every server
|
|
1202
1202
|
* render of the dashboard sidebar stayed reachable, its whole component tree
|
|
1203
1203
|
* and page props with it, until the server ran out of heap.
|
|
1204
|
+
*
|
|
1205
|
+
* The component's scope is read through `getCurrentScope`: Vue makes it the
|
|
1206
|
+
* active scope before it calls `beforeCreate`, and the instance's own `scope`
|
|
1207
|
+
* field is internal, absent from the typings a generated workspace checks.
|
|
1204
1208
|
*/
|
|
1205
1209
|
export function trackDmsServerScopes(app: App): () => void {
|
|
1206
1210
|
const scopes: EffectScope[] = [];
|
|
1207
1211
|
app.mixin({
|
|
1208
|
-
beforeCreate(
|
|
1209
|
-
|
|
1212
|
+
beforeCreate() {
|
|
1213
|
+
const scope = getCurrentScope();
|
|
1214
|
+
if (scope) scopes.push(scope);
|
|
1210
1215
|
},
|
|
1211
1216
|
});
|
|
1212
1217
|
return () => {
|