From 6acfd505e6324d0066fa4accab69d9fdb9aeb945 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 19 May 2012 12:15:28 +0400 Subject: [PATCH] fix type check in Ox.$ --- source/Ox/js/DOM.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox/js/DOM.js b/source/Ox/js/DOM.js index f64990c7..57b03af2 100644 --- a/source/Ox/js/DOM.js +++ b/source/Ox/js/DOM.js @@ -81,7 +81,7 @@ Ox.$ = Ox.element = function(val) { // fixme: remove click and mousedown, // add native css selector // take all matches of getElementsBy... - var element = Ox.isObject(val) ? val // window or document + var element = !Ox.isString(val) ? val // window or document : val[0] == '<' ? document.createElement(Ox.sub(val, 1, -1)) : val[0] == '#' ? document.getElementById(Ox.sub(val, 1)) : val[0] == '.' ? document.getElementsByClassName(Ox.sub(val, 1))[0]