Skip to content

Commit

Permalink
properly handle attr and style
Browse files Browse the repository at this point in the history
As part of 6d509c4, the native code that handles attr and style should
have been changed to handle non-Maybe values.
  • Loading branch information
seliopou committed May 1, 2014
1 parent be62e21 commit 610aa04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Native/D3/Selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ Elm.Native.D3.Selection.make = function(elm) {

function elm_attr(name, valfn) {
name = JS.fromString(name);
valfn = safeValfn(valfn, safeOptEvaluator);
valfn = safeValfn(valfn, safeEvaluator);
return function(k, selection, i) {
return k(selection.attr(name, safeIndexed(i, valfn)), i);
};
}

function elm_style(name, valfn) {
name = JS.fromString(name);
valfn = safeValfn(valfn, safeOptEvaluator);
valfn = safeValfn(valfn, safeEvaluator);
return function(k, selection, i) {
return k(selection.style(name, safeIndexed(i, valfn)), i);
};
Expand Down

0 comments on commit 610aa04

Please sign in to comment.