Skip to content

Commit

Permalink
Merge pull request #88 from yihui/bugfix/data.evals
Browse files Browse the repository at this point in the history
fixes timelyportfolio/parcoords#6: make sure data.evals is an array
  • Loading branch information
ramnathv committed Mar 16, 2015
2 parents dfac356 + 9e8d792 commit c80aa88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inst/www/htmlwidgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@
overrideMethod(shinyBinding, "renderValue", function(superfunc) {
return function(el, data) {
// Resolve strings marked as javascript literals to objects
if (!(data.evals instanceof Array)) data.evals = [data.evals];
for (var i = 0; data.evals && i < data.evals.length; i++) {
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]);
}
Expand Down Expand Up @@ -469,6 +470,7 @@
if (scriptData) {
var data = JSON.parse(scriptData.textContent || scriptData.text);
// Resolve strings marked as javascript literals to objects
if (!(data.evals instanceof Array)) data.evals = [data.evals];
for (var k = 0; data.evals && k < data.evals.length; k++) {
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]);
}
Expand Down

0 comments on commit c80aa88

Please sign in to comment.