@vue/server-renderer 3.6.0-alpha.4 → 3.6.0-alpha.6
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/server-renderer v3.6.0-alpha.
|
|
2
|
+
* @vue/server-renderer v3.6.0-alpha.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -454,7 +454,7 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
454
454
|
name = match[1];
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
if (!name && instance
|
|
457
|
+
if (!name && instance) {
|
|
458
458
|
const inferFromRegistry = (registry) => {
|
|
459
459
|
for (const key in registry) {
|
|
460
460
|
if (registry[key] === Component) {
|
|
@@ -462,8 +462,8 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
};
|
|
465
|
-
name = inferFromRegistry(
|
|
466
|
-
instance.
|
|
465
|
+
name = inferFromRegistry(instance.components) || instance.parent && inferFromRegistry(
|
|
466
|
+
instance.parent.type.components
|
|
467
467
|
) || inferFromRegistry(instance.appContext.components);
|
|
468
468
|
}
|
|
469
469
|
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|