From 1535b8027d751da7328b9bacb4e46a48daf2a3d8 Mon Sep 17 00:00:00 2001 From: alexcorvi Date: Thu, 6 Apr 2017 04:34:24 +0300 Subject: [PATCH] Fixed file double protocol --- src/transform/identify.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transform/identify.ts b/src/transform/identify.ts index a288085..b4a722b 100644 --- a/src/transform/identify.ts +++ b/src/transform/identify.ts @@ -18,12 +18,11 @@ export default function (inputArr:Array, options:Options) { var urlObj:URLObj|null = null; var protocol = hasProtocol(encoded) || ""; - // remove the protocol before proceeding to any other test if(protocol) encoded = encoded.substr(protocol.length); // test 1: it's a file - if(options.files && protocol === "file:///" && encoded.substr(protocol.length).split(/\/|\\/).length - 1) { + if(options.files && protocol === "file:///" && encoded.split(/\/|\\/).length - 1) { urlObj = { reason:"file", protocol:protocol,