yukyo0821 %!s(int64=3) %!d(string=hai) anos
pai
achega
a5257ac612
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      backstage/static/js/yo.js

+ 2 - 2
backstage/static/js/yo.js

@@ -670,7 +670,7 @@ function GenProductSection(mimg, specimg) {
                 + '"\n  layout="responsive">\n</amp-img>';
         }
     }
-    tmpstr = tmpstr.replaceAll('##AMP-IMG##', mimgstr);
+    tmpstr = tmpstr.replaceAll('##AMP-IMG##', mimgstr == "" ? "&nbsp;" : mimgstr);
 
     previmgstr = "";
     for (i = 0; i < mimg.blocks.length; i++) {
@@ -688,7 +688,7 @@ function GenProductSection(mimg, specimg) {
           </button>`;
         }
     }
-    tmpstr = tmpstr.replaceAll('##PREV-IMG##', previmgstr);
+    tmpstr = tmpstr.replaceAll('##PREV-IMG##', previmgstr == "" ? "&nbsp;" : previmgstr);
 
     specimgstr = "";
     for (i = 0; i < specimg.blocks.length; i++) {