Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make append always return the last argument

  • Loading branch information...
commit 7d6140054c5f997b488872fdca17903ceb25a26a 1 parent 4ab6b58
@marcuswestin authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.