feat:fix cannot find class in cascade context

This commit is contained in:
pengfei.zhou 2021-08-12 15:46:44 +08:00 committed by osborn
parent 6e048e39fc
commit 1996ec2ed7
7 changed files with 19 additions and 1 deletions

View File

@ -1445,6 +1445,9 @@ var doric = (function (exports) {
const className = arguments[1];
const srcContext = gContexts.get(srcContextId);
if (srcContext) {
srcContext.classes.forEach((v, k) => {
context === null || context === void 0 ? void 0 : context.classes.set(k, v);
});
const clz = srcContext.classes.get(className);
if (clz) {
return exportFunc(clz);

View File

@ -1474,6 +1474,9 @@ function jsObtainEntry(contextId) {
const className = arguments[1];
const srcContext = gContexts.get(srcContextId);
if (srcContext) {
srcContext.classes.forEach((v, k) => {
context === null || context === void 0 ? void 0 : context.classes.set(k, v);
});
const clz = srcContext.classes.get(className);
if (clz) {
return exportFunc(clz);

View File

@ -263,6 +263,9 @@ export function jsObtainEntry(contextId) {
const className = arguments[1];
const srcContext = gContexts.get(srcContextId);
if (srcContext) {
srcContext.classes.forEach((v, k) => {
context === null || context === void 0 ? void 0 : context.classes.set(k, v);
});
const clz = srcContext.classes.get(className);
if (clz) {
return exportFunc(clz);

View File

@ -285,6 +285,9 @@ export function jsObtainEntry(contextId: string) {
const className = arguments[1] as string
const srcContext = gContexts.get(srcContextId)
if (srcContext) {
srcContext.classes.forEach((v, k) => {
context?.classes.set(k, v)
})
const clz = srcContext.classes.get(className)
if (clz) {
return exportFunc(clz)

View File

@ -324,6 +324,9 @@ export function jsObtainEntry(contextId: string) {
const className = arguments[1] as string
const srcContext = gContexts.get(srcContextId)
if (srcContext) {
srcContext.classes.forEach((v, k) => {
context?.classes.set(k, v)
})
const clz = srcContext.classes.get(className)
if (clz) {
return exportFunc(clz)

View File

@ -1447,6 +1447,9 @@ var doric = (function (exports) {
const className = arguments[1];
const srcContext = gContexts.get(srcContextId);
if (srcContext) {
srcContext.classes.forEach((v, k) => {
context === null || context === void 0 ? void 0 : context.classes.set(k, v);
});
const clz = srcContext.classes.get(className);
if (clz) {
return exportFunc(clz);

File diff suppressed because one or more lines are too long