Fix passing date as argument to page.evaluate().

https://github.com/ariya/phantomjs/issues/12615
2.0
Jacek Migdal 2014-12-11 20:43:39 -08:00
parent 32d20b4aa7
commit 806da21e2b
1 changed files with 3 additions and 1 deletions

View File

@ -370,9 +370,11 @@ function decorateNewPage(opts, page) {
switch (argType) {
case "object": //< for type "object"
case "array": //< for type "array"
case "date": //< for type "date"
str += JSON.stringify(arg) + ","
break;
case "date": //< for type "date"
str += "new Date(" + JSON.stringify(arg) + "),"
break;
case "string": //< for type "string"
str += quoteString(arg) + ',';
break;