projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c51ab7
)
fix null reference in Chrome
author
Dan Vanderkam
<danvk@google.com>
Fri, 15 Oct 2010 14:36:33 +0000
(10:36 -0400)
committer
Dan Vanderkam
<danvk@google.com>
Fri, 15 Oct 2010 14:36:33 +0000
(10:36 -0400)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
6396ef2
..
89a461f
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-2492,7
+2492,8
@@
Dygraph.addAnnotationRule = function() {
"background-color: white; " +
"text-align: center;";
if (mysheet.insertRule) { // Firefox
- mysheet.insertRule(".dygraphDefaultAnnotation { " + rule + " }", mysheet.cssRules.length);
+ var idx = mysheet.cssRules ? mysheet.cssRules.length : 0;
+ mysheet.insertRule(".dygraphDefaultAnnotation { " + rule + " }", idx);
} else if (mysheet.addRule) { // IE
mysheet.addRule(".dygraphDefaultAnnotation", rule);
}