LI JIAHAO 6 lat temu
rodzic
commit
fcec2ec82b
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      dist/webshot.js
  2. 1 1
      src/webshot.ts

+ 1 - 1
dist/webshot.js

@@ -48,7 +48,7 @@ function renderWebshot(url, height) {
         });
     });
     return promise.then(data => {
-        if (data.boundary != null)
+        if (data.boundary === null)
             return renderWebshot(url, height * 2);
         else
             return data.data;

+ 1 - 1
src/webshot.ts

@@ -47,7 +47,7 @@ function renderWebshot(url: string, height: number): Promise<string> {
       });
   });
   return promise.then(data => {
-    if (data.boundary != null) return renderWebshot(url, height * 2);
+    if (data.boundary === null) return renderWebshot(url, height * 2);
     else return data.data;
   })
 }