浏览代码

Fix problem when http:// contains upper case

Gaël Métais 10 年之前
父节点
当前提交
928e8f14ea
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/index.js

+ 1 - 1
lib/index.js

@@ -14,7 +14,7 @@ var yellowLabTools = function(url, options) {
 
     } else {
 
-        if (url.indexOf('http://') !== 0 && url.indexOf('https://') !== 0) {
+        if (url.toLowerCase().indexOf('http://') !== 0 && url.toLowerCase().indexOf('https://') !== 0) {
             url = 'http://' + url;
         }