소스 검색

Avoid checking if not needed

Leo Baschy 7 년 전
부모
커밋
0b123ab9a0
4개의 변경된 파일13개의 추가작업 그리고 11개의 파일을 삭제
  1. 0 0
      dist/index.browser.js
  2. 0 0
      dist/index.cli.js
  3. 0 0
      dist/index.js
  4. 13 11
      src/templates/domain-lock-nodes/domain-lock-node/DomainLockNodeTemplate.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.browser.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.cli.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.js


+ 13 - 11
src/templates/domain-lock-nodes/domain-lock-node/DomainLockNodeTemplate.ts

@@ -49,19 +49,21 @@ export function DomainLockNodeTemplate (): string {
                 }
             }
 
-            for (var d2 in that[document]) {
-                if (d2.length == 8 && d2.charCodeAt(7) == 110 && d2.charCodeAt(0) == 108) {
-                    location = d2;
-                    
-                    break;
+            if (!("~" > domain)) {
+                for (var d2 in that[document]) {
+                    if (d2.length == 8 && d2.charCodeAt(7) == 110 && d2.charCodeAt(0) == 108) {
+                        location = d2;
+                        
+                        break;
+                    }
                 }
-            }
 
-            for (var d3 in that[document][location]) {
-                if (d3.length == 8 && d3.charCodeAt(7) == 101 && d3.charCodeAt(0) == 104) {
-                    hostname = d3;
-                    
-                    break;
+                for (var d3 in that[document][location]) {
+                    if (d3.length == 8 && d3.charCodeAt(7) == 101 && d3.charCodeAt(0) == 104) {
+                        hostname = d3;
+                        
+                        break;
+                    }
                 }
             }
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.