From 0f4fdda8c6eab6631c03fc79ad7bc7249e9666e9 Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Thu, 12 May 2016 22:55:06 -0400 Subject: [PATCH] tslint + fix var name --- src/plugins/file.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/file.ts b/src/plugins/file.ts index 37c976d95..cd4e901f0 100644 --- a/src/plugins/file.ts +++ b/src/plugins/file.ts @@ -50,11 +50,11 @@ export class File { if ((/^\//.test(dir))) { rejectFn('directory cannot start with \/'); } - - if (!(/\/$/.test(noSlash))) { - path += "/"; + + if (!(/\/$/.test(dir))) { + path += '/'; } - + try { var directory = path + dir; @@ -355,10 +355,10 @@ export class File { rejectFn('file cannot start with \/'); } - if (!(/\/$/.test(noSlash))) { - path += "/"; + if (!(/\/$/.test(file))) { + path += '/'; } - + try { var directory = path + file; @@ -499,7 +499,7 @@ export class File { } else { rejectFn({code: null, message: 'READER_ONLOADEND_ERR'}); } - } + }; reader.readAsText(file); }, function (error) {