Issues (71)

js/lib/API/base.js (3 issues)

Labels
1
/* 
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
7
8
/* global browser, chrome */
9
if (typeof API === "undefined") {
0 ignored issues
show
The variable API seems to be never initialized.
Loading history...
10
    var API = {};
11
}
12
/* jshint ignore:start */
13
API.api;
0 ignored issues
show
The result of the property access to API.api is not used.
Loading history...
The variable API does not seem to be initialized in case typeof API === "undefined" on line 9 is false. Are you sure this can never be the case?
Loading history...
14
API.promise = true;     // Chrome does not return promises
15
/* jshint ignore:end */
16
17
// Workaround chrome's uniqueness
18
if (typeof browser === 'undefined') {
19
    API.api = chrome;
20
    API.promise = false;
21
}
22
else{
23
    API.api = browser;
24
}