Explorar el Código

Optional options

Michelle Bu hace 12 años
padre
commit
6140fb391d
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      lib/util.js

+ 1 - 0
lib/util.js

@@ -13,6 +13,7 @@ var util = {
     });
   },
   extend: function(dest, source) {
+    source = source || {}
     for(var key in source) {
       if(source.hasOwnProperty(key)) {
         dest[key] = source[key];