You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/02 11:19:40 UTC
[3/7] incubator-ponymail git commit: utilize isHash some more
utilize isHash some more
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/435a392f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/435a392f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/435a392f
Branch: refs/heads/coffee-and-cake
Commit: 435a392f86aa5fd138dd3d4889b8ad061950bee9
Parents: 271f10f
Author: Daniel Gruno <hu...@apache.org>
Authored: Fri Sep 2 12:58:27 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Fri Sep 2 12:58:27 2016 +0200
----------------------------------------------------------------------
site/js/coffee/dom_utils.coffee | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/435a392f/site/js/coffee/dom_utils.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/dom_utils.coffee b/site/js/coffee/dom_utils.coffee
index c033a14..f594ffb 100644
--- a/site/js/coffee/dom_utils.coffee
+++ b/site/js/coffee/dom_utils.coffee
@@ -32,7 +32,7 @@ mk = (type, params, children) ->
r = document.createElement(type)
### If params have been passed, set them ###
- if params
+ if isHash(params)
for k, v of params
### Standard string value? ###
if typeof v is "string"
@@ -40,7 +40,7 @@ mk = (type, params, children) ->
else if isArray(v)
### Are we passing a list of data to set? concatenate then ###
r.setAttribute(k, v.join(" "))
- else if typeof(v) is "object"
+ else if isHash(v)
### Are we trying to set multiple sub elements, like a style? ###
for x,y of v
r[k][x] = y