summaryrefslogtreecommitdiffstats
path: root/src/color.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.js')
-rw-r--r--src/color.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/color.js b/src/color.js
index 89c811d..bd4b6b0 100644
--- a/src/color.js
+++ b/src/color.js
@@ -155,10 +155,10 @@ SVG.Color.test = function(color) {
// Test if given value is a rgb object
SVG.Color.isRgb = function(color) {
- return typeof color.r == 'number'
+ return color && typeof color.r == 'number'
}
// Test if given value is a hsb object
SVG.Color.isHsb = function(color) {
- return typeof color.h == 'number'
+ return color && typeof color.h == 'number'
} \ No newline at end of file