Skip to content

Commit

Permalink
Make append always return the last argument
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswestin committed May 5, 2012
1 parent 4ab6b58 commit 7d61400
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
return this
},
append:function append() {
if (this.el) {
this._processArgs(arguments, 0)
} else {
this._args = this._args.concat(slice(arguments))
}
return this
var args = arguments
if (this.el) { this._processArgs(args, 0) }
else { this._args = this._args.concat(slice(args)) }
return args[args.length - 1]
},
prepend:function prepend(tag) {
var el = this.el
Expand Down

0 comments on commit 7d61400

Please sign in to comment.