Fixed the mapNumbers require call
authorIonică Bizău <bizauionica@gmail.com>
Thu, 17 Sep 2015 09:24:12 +0000 (12:24 +0300)
committerIonică Bizău <bizauionica@gmail.com>
Thu, 17 Sep 2015 09:24:12 +0000 (12:24 +0300)
Since mapNumber.js is a file, we should prefix it with "./", otherwise an error is thrown.

docs/api/remote.md

index 1c5c831a1790a910730f03a8efb9e469505b1f29..55893c65f1c4e1803fbb97efbf339647136fc323 100644 (file)
@@ -79,7 +79,7 @@ exports.withLocalCallback = function() {
 
 ```javascript
 // renderer process
-var mapNumbers = require("remote").require("mapNumbers");
+var mapNumbers = require("remote").require("./mapNumbers");
 
 var withRendererCb = mapNumbers.withRendererCallback(function(x) {
   return x + 1;