Logging widgets :Fixed issue on Firefox where logging does not work (#5223)

* Fixed issue on Firefox where logging does not work properly due to column names

* Remove second argument to utils.logTable
browser-messaging-saver
Saq Imtiaz 2020-12-07 16:53:49 +01:00 zatwierdzone przez GitHub
rodzic 2c76cfa67a
commit ce5d20b8fc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -56,9 +56,9 @@ exports.warning = function(text) {
/*
Log a table of name: value pairs
*/
exports.logTable = function(data,columnNames) {
exports.logTable = function(data) {
if(console.table) {
console.table(data,columnNames);
console.table(data);
} else {
$tw.utils.each(data,function(value,name) {
console.log(name + ": " + value);

Wyświetl plik

@ -78,11 +78,11 @@ LogWidget.prototype.log = function() {
console.group(this.message);
if(dataCount > 0) {
$tw.utils.logTable(data,["name","value"]);
$tw.utils.logTable(data);
}
if(this.logAll || !dataCount) {
console.groupCollapsed("All variables");
$tw.utils.logTable(allVars,["name","value"]);
$tw.utils.logTable(allVars);
console.groupEnd();
}
console.groupEnd();