make jshint happy
This commit is contained in:
parent
d1cb5266ca
commit
439fbf6b41
|
@ -1,4 +1,5 @@
|
||||||
var Promise = require('bluebird');
|
/*jshint esversion: 6 */
|
||||||
|
var Promise = require('bluebird'); // jshint ignore: line
|
||||||
//var Ipfs = require('./ipfs.js');
|
//var Ipfs = require('./ipfs.js');
|
||||||
|
|
||||||
var EmbarkJS = {
|
var EmbarkJS = {
|
||||||
|
@ -235,6 +236,7 @@ EmbarkJS.Messages.Whisper.sendMessage = function(options) {
|
||||||
var identity = options.identity || this.identity || web3.shh.newIdentity();
|
var identity = options.identity || this.identity || web3.shh.newIdentity();
|
||||||
var ttl = options.ttl || 100;
|
var ttl = options.ttl || 100;
|
||||||
var priority = options.priority || 1000;
|
var priority = options.priority || 1000;
|
||||||
|
var _topics;
|
||||||
|
|
||||||
if (topics === undefined) {
|
if (topics === undefined) {
|
||||||
throw new Error("missing option: topic");
|
throw new Error("missing option: topic");
|
||||||
|
@ -249,7 +251,6 @@ EmbarkJS.Messages.Whisper.sendMessage = function(options) {
|
||||||
_topics = [web3.fromAscii(topics)];
|
_topics = [web3.fromAscii(topics)];
|
||||||
} else {
|
} else {
|
||||||
// TODO: replace with es6 + babel;
|
// TODO: replace with es6 + babel;
|
||||||
var _topics = [];
|
|
||||||
for (var i = 0; i < topics.length; i++) {
|
for (var i = 0; i < topics.length; i++) {
|
||||||
_topics.push(web3.fromAscii(topics[i]));
|
_topics.push(web3.fromAscii(topics[i]));
|
||||||
}
|
}
|
||||||
|
@ -271,12 +272,12 @@ EmbarkJS.Messages.Whisper.sendMessage = function(options) {
|
||||||
|
|
||||||
EmbarkJS.Messages.Whisper.listenTo = function(options) {
|
EmbarkJS.Messages.Whisper.listenTo = function(options) {
|
||||||
var topics = options.topic || options.topics;
|
var topics = options.topic || options.topics;
|
||||||
|
var _topics;
|
||||||
|
|
||||||
if (typeof topics === 'string') {
|
if (typeof topics === 'string') {
|
||||||
_topics = [topics];
|
_topics = [topics];
|
||||||
} else {
|
} else {
|
||||||
// TODO: replace with es6 + babel;
|
// TODO: replace with es6 + babel;
|
||||||
var _topics = [];
|
|
||||||
for (var i = 0; i < topics.length; i++) {
|
for (var i = 0; i < topics.length; i++) {
|
||||||
_topics.push(topics[i]);
|
_topics.push(topics[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue