[Pkg-javascript-commits] [d3-tip.js] 201/277: check if the last item passed to ship show is an svgelement before we pop the array
bhuvan krishna
bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.
commit 3a2620d4aa2f75ea798b2ccc0a105387fdaf3e7d
Author: Justin Palmer <justin at github.com>
Date: Tue Nov 5 16:13:15 2013 -0800
check if the last item passed to ship show is an svgelement before we pop the array
---
index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.js b/index.js
index 1ea31db..6cfa3cb 100644
--- a/index.js
+++ b/index.js
@@ -26,7 +26,7 @@ d3.tip = function() {
// Returns a tip
tip.show = function() {
var args = Array.prototype.slice.call(arguments)
- if(args.length > 1) target = args.pop()
+ if(args[args.length - 1] instanceof SVGElement) target = args.pop()
var content = html.apply(this, args),
poffset = offset.apply(this, args),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git
More information about the Pkg-javascript-commits
mailing list