Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Include numeric refs in string ref shim
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jul 17, 2016
1 parent 2cd09a0 commit 7688319
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ function createElement(...args) {

applyClassName(vnode);

let ref = vnode.attributes && vnode.attributes.ref;
if (currentComponent && ref && typeof ref==='string') {
let ref = vnode.attributes && vnode.attributes.ref,
type = ref && typeof ref;
if (currentComponent && (type==='string' || type==='number')) {
vnode.attributes.ref = createStringRefProxy(ref, currentComponent);
}

Expand Down

0 comments on commit 7688319

Please sign in to comment.