Permalink
Browse files

Make append always return the last argument

  • Loading branch information...
1 parent 4ab6b58 commit 7d6140054c5f997b488872fdca17903ceb25a26a @marcuswestin committed May 5, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 tags.js
View
10 tags.js
@@ -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

0 comments on commit 7d61400

Please sign in to comment.