Skip to content

Commit

Permalink
Merge pull request ElemeFE#4415 from Leopoldthecoder/dev
Browse files Browse the repository at this point in the history
Tree: fix registerNode error when nodeKey is 0
  • Loading branch information
QingWei-Li committed Apr 24, 2017
2 parents 7036276 + 1c4ff99 commit 19ae5e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
![JS gzip size](http://img.badgesize.io/https://unpkg.com/element-ui/lib/index.js?compression=gzip&label=gzip%20size:%20JS)
![CSS gzip size](http://img.badgesize.io/https://unpkg.com/element-ui/lib/theme-default/index.css?compression=gzip&label=gzip%20size:%20CSS)
[![Join the chat at https://gitter.im/ElemeFE/element](https://badges.gitter.im/ElemeFE/element.svg)](https://gitter.im/ElemeFE/element?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/element-en/Lobby](https://badges.gitter.im/element-en/Lobby.svg)](https://gitter.im/element-en/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![OpenCollective](https://opencollective.com/element/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/element/sponsors/badge.svg)](#sponsors)

Expand Down
2 changes: 1 addition & 1 deletion examples/docs/zh-CN/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@

### 手风琴模式

每次只打开一个同级树节点展开
对于同一级的节点,每次只能展开一个

::: demo
```html
Expand Down
2 changes: 1 addition & 1 deletion packages/tree/src/model/tree-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default class TreeStore {
if (!key || !node || !node.data) return;

const nodeKey = node.key;
if (nodeKey) this.nodesMap[node.key] = node;
if (nodeKey !== undefined) this.nodesMap[node.key] = node;
}

deregisterNode(node) {
Expand Down
2 changes: 1 addition & 1 deletion packages/upload/src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function getError(action, option, xhr) {
} else if (xhr.responseText) {
msg = `${xhr.status} ${xhr.responseText}`;
} else {
msg = `fail to post ${action} ${xhr.status}'`;
msg = `fail to post ${action} ${xhr.status}`;
}

const err = new Error(msg);
Expand Down

0 comments on commit 19ae5e8

Please sign in to comment.