Browse Source

Exporting $nil as well as nil.

Herby Vojčík 4 years ago
parent
commit
05f3032e58
2 changed files with 8 additions and 3 deletions
  1. 2 0
      lang/API-CHANGES.txt
  2. 6 3
      lang/base/helpers.js

+ 2 - 0
lang/API-CHANGES.txt

@@ -9,6 +9,8 @@
   + javaScriptConstructor:
 + amber/boot api >>
   + detachClass(klass)
++ amber/helpers exports >>
+  + $nil
 
 - amber/boot api >>
   - addElement(arraySet, el)

+ 6 - 3
lang/base/helpers.js

@@ -1,8 +1,7 @@
 define(["amber/boot", "require"], function (boot, require) {
     var globals = boot.globals,
         exports = {},
-        api = boot.api,
-        nil = boot.nilAsReceiver;
+        api = boot.api;
 
     // API
 
@@ -21,8 +20,12 @@ define(["amber/boot", "require"], function (boot, require) {
         value: globals,
         enumerable: true, configurable: true, writable: false
     });
+    Object.defineProperty(exports, "$nil", {
+        value: boot.nilAsReceiver,
+        enumerable: true, configurable: true, writable: false
+    });
     Object.defineProperty(exports, "nil", {
-        value: nil,
+        value: boot.nilAsValue,
         enumerable: true, configurable: true, writable: false
     });