File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- var Promise = require ( 'bluebird' ) ;
1+ /*jshint esversion: 6 */
2+ var Promise = require ( 'bluebird' ) ; // jshint ignore: line
23//var Ipfs = require('./ipfs.js');
34
45var EmbarkJS = {
@@ -235,6 +236,7 @@ EmbarkJS.Messages.Whisper.sendMessage = function(options) {
235236 var identity = options . identity || this . identity || web3 . shh . newIdentity ( ) ;
236237 var ttl = options . ttl || 100 ;
237238 var priority = options . priority || 1000 ;
239+ var _topics ;
238240
239241 if ( topics === undefined ) {
240242 throw new Error ( "missing option: topic" ) ;
@@ -249,7 +251,6 @@ EmbarkJS.Messages.Whisper.sendMessage = function(options) {
249251 _topics = [ web3 . fromAscii ( topics ) ] ;
250252 } else {
251253 // TODO: replace with es6 + babel;
252- var _topics = [ ] ;
253254 for ( var i = 0 ; i < topics . length ; i ++ ) {
254255 _topics . push ( web3 . fromAscii ( topics [ i ] ) ) ;
255256 }
@@ -271,12 +272,12 @@ EmbarkJS.Messages.Whisper.sendMessage = function(options) {
271272
272273EmbarkJS . Messages . Whisper . listenTo = function ( options ) {
273274 var topics = options . topic || options . topics ;
275+ var _topics ;
274276
275277 if ( typeof topics === 'string' ) {
276278 _topics = [ topics ] ;
277279 } else {
278280 // TODO: replace with es6 + babel;
279- var _topics = [ ] ;
280281 for ( var i = 0 ; i < topics . length ; i ++ ) {
281282 _topics . push ( topics [ i ] ) ;
282283 }
You can’t perform that action at this time.
0 commit comments