Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
receiver: fix logging with Android
Browse files Browse the repository at this point in the history
The use of apply is dangerous if we accidently pass additional arguments
to the log function.. This made Dashkiosk reload on some errors.
  • Loading branch information
vincentbernat committed Nov 5, 2016
1 parent 9a57f12 commit 2d8807d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/scripts/receiver/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module.exports = (function(window) {
'use strict';

if (window.JSInterface && window.JSInterface.log) {
var log = function() {
return function() {
window.JSInterface.log.apply(window.JSInterface, arguments);
var log = function(level) {
return function(message) {
window.JSInterface.log(level + ': ' + message);
};
};
return {
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/receiver/iframe-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ module.exports = (function(window, undefined) {
ready: function() {
// Sanity check: are we the first iframe?
if (iframe !== this.queue[0]) {
console.warn('[Dashkiosk] BUG: request to display a new iframe which is not in our queue',
iframe, this.queue);
console.warn('[Dashkiosk] BUG: request to display a new iframe which is not in our queue (' +
iframe + ', ' + this.queue);
iframe.remove();
return;
}
Expand Down

0 comments on commit 2d8807d

Please sign in to comment.