From b15fd4a16270f39f5d66fd8d64a3f820df8c38e3 Mon Sep 17 00:00:00 2001 From: Arnout Kazemier Date: Mon, 5 Nov 2018 14:35:26 +0100 Subject: [PATCH] [ocd] code style --- index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index e9d5a6f..c616bfd 100644 --- a/index.js +++ b/index.js @@ -55,14 +55,11 @@ var ignore = { hash: 1, query: 1 }; function lolcation(loc) { var globalVar; - if (typeof window !== 'undefined') - globalVar = window; - else if (typeof global !== 'undefined') - globalVar = global; - else if (typeof self !== 'undefined') - globalVar = self; - else - globalVar = {}; + if (typeof window !== 'undefined') globalVar = window; + else if (typeof global !== 'undefined') globalVar = global; + else if (typeof self !== 'undefined') globalVar = self; + else globalVar = {}; + var location = globalVar.location || {}; loc = loc || location;