Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Apr 12, 2016
2 parents a99eff8 + 6f577a2 commit ad570de
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Demo: http://cheton.github.io/infinite-tree
Yes | Yes | Yes| 8+ | Yes | Yes |
Need to include [es5-shim](https://github.com/es-shims/es5-shim#example-of-applying-es-compatability-shims-in-a-browser-project) polyfill for IE8

## React Support
Check out <b>react-infinite-tree</b> at https://github.com/cheton/react-infinite-tree.

## Notice
<i>The project is under heavy development and a lot of things are changing. Stay tuned for further updates.</i>

Expand Down
9 changes: 6 additions & 3 deletions dist/infinite-tree.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! infinite-tree v0.8.1 | (c) 2016 Cheton Wu <[email protected]> | MIT | https://github.com/cheton/infinite-tree */
/*! infinite-tree v0.8.2 | (c) 2016 Cheton Wu <[email protected]> | MIT | https://github.com/cheton/infinite-tree */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -731,8 +731,11 @@ return /******/ (function(modules) { // webpackBootstrap
_this5.appendChildNode(childNode, node);
});

// Call openNode again
_this5.openNode(node);
// Ensure the node has children to prevent from infinite loop
if (node.hasChildren()) {
// Call openNode again
_this5.openNode(node);
}
});

return false;
Expand Down
4 changes: 2 additions & 2 deletions dist/infinite-tree.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/bundle.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>infinite-tree</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style>
html, body {
Expand Down Expand Up @@ -78,7 +80,6 @@
line-height: 42px;
}
</style>
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
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": "infinite-tree",
"version": "0.8.1",
"version": "0.8.2",
"description": "A browser-ready tree library that can efficiently display a large tree with smooth scrolling.",
"homepage": "https://github.com/cheton/infinite-tree",
"main": "lib/index.js",
Expand Down
7 changes: 5 additions & 2 deletions src/infinite-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,11 @@ class InfiniteTree extends events.EventEmitter {
this.appendChildNode(childNode, node);
});

// Call openNode again
this.openNode(node);
// Ensure the node has children to prevent from infinite loop
if (node.hasChildren()) {
// Call openNode again
this.openNode(node);
}
});

return false;
Expand Down

0 comments on commit ad570de

Please sign in to comment.