Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a client side example

  • Loading branch information...
commit c54585d9a70e1ca1cbee367dc898bbd483e82e47 1 parent e9cbfee
@laktek authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/sugarless.js
View
6 lib/sugarless.js
@@ -113,7 +113,7 @@
var _sugarless = function(){
//set the object
var obj = arguments[0];
-
+
//if the object is undefined exception will be thrown
if(obj === undefined){
throw new Error("Should provide an object");
@@ -190,9 +190,9 @@
_sugarless.invoke = function(){
var passed_args = Array.prototype.slice.call(arguments);
- //slice it again if the first argument is not a string (assume an array is passed)
+ //if an array is passed
if(passed_args.length === 1 && typeof passed_args[0] !== "string"){
- passed_args = passed_args[0].slice();
+ passed_args = passed_args[0];
}
//extract the method
Please sign in to comment.
Something went wrong with that request. Please try again.