зеркало из https://github.com/mozilla/lightbeam.git
Fix a few JS warnings that pop into the console
This commit is contained in:
Родитель
2d83067960
Коммит
088617d834
|
@ -286,6 +286,7 @@ function GraphEdge(source, target, connection) {
|
||||||
if (connection) {
|
if (connection) {
|
||||||
this.cookieCount = connection.cookie ? 1 : 0;
|
this.cookieCount = connection.cookie ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
// console.log('edge: %s', this.name);
|
// console.log('edge: %s', this.name);
|
||||||
}
|
}
|
||||||
GraphEdge.prototype.lastAccess = function () {
|
GraphEdge.prototype.lastAccess = function () {
|
||||||
|
|
|
@ -26,9 +26,11 @@ function svgdataset(elem) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
elem.setAttribute(dataKeyToAttr(key), JSON.stringify(value));
|
var s = JSON.stringify(value);
|
||||||
|
elem.setAttribute(dataKeyToAttr(key), s);
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// Create read-only shortcuts for convenience
|
// Create read-only shortcuts for convenience
|
||||||
Array.prototype.forEach.call(elem.attributes, function (attr) {
|
Array.prototype.forEach.call(elem.attributes, function (attr) {
|
||||||
if (attr.name.startsWith('data-')) {
|
if (attr.name.startsWith('data-')) {
|
||||||
|
|
|
@ -182,6 +182,7 @@ global.getZoom = function getZoom(canvas) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('error in getZoom, called with %o instead of an element');
|
console.log('error in getZoom, called with %o instead of an element');
|
||||||
console.log('Caller: %o', caller);
|
console.log('Caller: %o', caller);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче