From 98f278a34a957134688e147ec65b1b1115244234 Mon Sep 17 00:00:00 2001 From: James Halliday Date: Mon, 23 Sep 2013 22:13:09 -0700 Subject: [PATCH] guard for the presence of getTime --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 563ba6e..2f2cf67 100644 --- a/index.js +++ b/index.js @@ -234,7 +234,7 @@ function copy (src) { dst = []; } else if (isDate(src)) { - dst = new Date(src.getTime()); + dst = new Date(src.getTime ? src.getTime() : src); } else if (isRegExp(src)) { dst = new RegExp(src);