Skip to content

Commit 439fbf6

Browse files
committed
make jshint happy
1 parent d1cb526 commit 439fbf6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

js/embark.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
var Promise = require('bluebird');
1+
/*jshint esversion: 6 */
2+
var Promise = require('bluebird'); // jshint ignore: line
23
//var Ipfs = require('./ipfs.js');
34

45
var 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

272273
EmbarkJS.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
}

0 commit comments

Comments
 (0)