consolidate the from value resolution in the find function
authorDan Allen <dan@opendevise.com>
Tue, 27 Mar 2018 07:01:16 +0000 (01:01 -0600)
committerDan Allen <dan@opendevise.com>
Tue, 27 Mar 2018 07:01:16 +0000 (01:01 -0600)
src/js/01-navigation.js

index 0d0ad0a..101a2a6 100644 (file)
   }
 
   function find (selector, from) {
-    from = from || document
-    return [].slice.call(from.querySelectorAll(selector))
+    return [].slice.call((from || document).querySelectorAll(selector))
   }
 })()