r9783 - helma-ng/trunk/modules/core
[email protected] Fri, 15 May 2009 10:45:46 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090515084546.9A77B3D0D6@mia> |
Author: hannes
Date: 2009-05-15 10:45:46 +0200 (Fri, 15 May 2009)
New Revision: 9783
Modified:
helma-ng/trunk/modules/core/json2.js
Log:
Use export() to export JSON to fix a bug with JSON not being set in module scope
Details at http://dev.helma.org/trac/helma/changeset/9783
Modified: helma-ng/trunk/modules/core/json2.js
===================================================================
--- helma-ng/trunk/modules/core/json2.js 2009-05-14 23:23:32 UTC (rev 9782)
+++ helma-ng/trunk/modules/core/json2.js 2009-05-15 08:45:46 UTC (rev 9783)
@@ -158,10 +158,11 @@
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
-if (!exports.JSON) {
- exports.JSON = {};
+export('JSON');
+
+if (!this.JSON) {
+ JSON = {};
}
-
(function () {
function f(n) {