فهرست منبع

skip processing when lsxContextMap is null

Yuki Takei 4 سال پیش
والد
کامیت
1702374bec
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      packages/plugin-lsx/src/client/js/util/Interceptor/LsxPostRenderInterceptor.js

+ 4 - 0
packages/plugin-lsx/src/client/js/util/Interceptor/LsxPostRenderInterceptor.js

@@ -34,6 +34,10 @@ export class LsxPostRenderInterceptor extends BasicInterceptor {
   process(contextName, ...args) {
     const context = Object.assign(args[0]); // clone
 
+    if (context.lsxContextMap == null) {
+      return Promise.resolve();
+    }
+
     // forEach keys of lsxContextMap
     Object.keys(context.lsxContextMap).forEach((renderId) => {
       const elem = document.getElementById(renderId);