Skip to content

Commit

Permalink
Do not crash when passed empty strings in innerHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGermaneri committed Jan 20, 2019
1 parent 485376c commit e962f29
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ or
Using Vue
---------

<cavnas-datagrid :data.prop="[{"col1": "row 1 column 1"}]"></cavnas-datagrid>
<canvas-datagrid :data.prop="[{"col1": "row 1 column 1"}]"></canvas-datagrid>


More Demos
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2036
2037
3 changes: 3 additions & 0 deletions dist/canvas-datagrid.debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.debug.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/intf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,9 @@ define([], function () {
return Object.keys(self.parsers);
};
self.parseInnerHtml = function (data) {
if (!data || /^ +$/.test(data)) {
return [];
}
try {
data = JSON.parse(data);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canvas-datagrid",
"version": "0.22.8",
"version": "0.22.9",
"description": "Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.",
"main": "./dist/canvas-datagrid.js",
"scripts": {
Expand Down

0 comments on commit e962f29

Please sign in to comment.