mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fixed the mapNumbers require call
Since mapNumber.js is a file, we should prefix it with "./", otherwise an error is thrown.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user