From 53f52e1a7debbbbb369c7874ababb8ebd0636602 Mon Sep 17 00:00:00 2001 From: robertj Date: Thu, 1 Oct 2015 17:11:54 +0200 Subject: [PATCH] fix inline styling error At the moment inline styles are never rendered by purescript-react. I dont know if this has a negative effect on ``` aria :: forall ariaAttrs. { | ariaAttrs } -> Props aria = unsafeUnfoldProps "aria" _data :: forall dataAttrs. { | dataAttrs } -> Props _data = unsafeUnfoldProps "data" ``` --- src/React/DOM/Props.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/React/DOM/Props.js b/src/React/DOM/Props.js index 7865054..989dcfa 100644 --- a/src/React/DOM/Props.js +++ b/src/React/DOM/Props.js @@ -14,13 +14,15 @@ exports.unsafeMkProps = function(key) { exports.unsafeUnfoldProps = function(key) { return function(value) { var result = {}; + var props = {}; + props[key] = result; for (var subprop in value) { if (value.hasOwnProperty(subprop)) { - result[key + '-' + subprop] = value[subprop]; + result[subprop] = value[subprop]; } } - return result; + return props; }; };