r9211: don't try to encode functions in the AJAJ object encoder
authorAndrew Tridgell <tridge@samba.org>
Mon, 8 Aug 2005 03:21:16 +0000 (03:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:31:31 +0000 (13:31 -0500)
(This used to be commit a08104a13c722b3888aecd365e32aae63ea481e5)

swat/scripting/client/encoder.js

index 20eec9e..2b1db66 100644 (file)
@@ -37,7 +37,7 @@ function encodeObject(o) {
                        r = r + "" + i + ":" + t + ":" + o[i] + ":";
                } else if (t == 'undefined' || t == 'null') {
                        r = r + "" + i + ":" + t + ":";
-               } else {
+               } else if (t != 'function') {
                        alert("Unable to encode type " + t);
                }
        }