Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

instanceof check #11

Merged
merged 1 commit into from Jan 7, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions doc.js
Expand Up @@ -52,6 +52,7 @@ function order (a, b) {
}

function Doc (id) {
if (!(this instanceof Doc)) return new Doc(id)
//the id of the doc refers to the instance.
//that is, to the node.
//it's used to identify a node
Expand Down