Skip to content

Commit e9100d4

Browse files
committed
v1.6.6
1 parent fdd97e5 commit e9100d4

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ v1.6.4 - Ensure package.json's 'main' is a fully qualified path, to fix webpack
324324

325325
v1.6.5 - Ensure the provided message is included when calling trace() in IE11
326326

327+
v1.6.6 - Fix bugs in v1.6.5, which caused issues in node.js & IE < 9
328+
327329
## License
328330
Copyright (c) 2013 Tim Perry
329331
Licensed under the MIT license.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "loglevel",
3-
"version": "1.6.5",
3+
"version": "1.6.6",
44
"main": "dist/loglevel.min.js",
55
"dependencies": {},
66
"ignore": [

dist/loglevel.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! loglevel - v1.6.5 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
1+
/*! loglevel - v1.6.6 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
22
(function (root, definition) {
33
"use strict";
44
if (typeof define === 'function' && define.amd) {
@@ -14,9 +14,8 @@
1414
// Slightly dubious tricks to cut down minimized file size
1515
var noop = function() {};
1616
var undefinedType = "undefined";
17-
var isIE = (
18-
window.navigator.userAgent.indexOf('Trident/') >= 0 ||
19-
window.navigator.userAgent.indexOf('MSIE ') >= 0
17+
var isIE = (typeof window !== undefinedType) && (
18+
/Trident\/|MSIE /.test(window.navigator.userAgent)
2019
);
2120

2221
var logMethods = [
@@ -46,7 +45,14 @@
4645

4746
// Trace() doesn't print the message in IE, so for that case we need to wrap it
4847
function traceForIE() {
49-
if (console.log) console.log.apply(console, arguments);
48+
if (console.log) {
49+
if (console.log.apply) {
50+
console.log.apply(console, arguments);
51+
} else {
52+
// In old IE, native console methods themselves don't have apply().
53+
Function.prototype.apply.apply(console.log, [console, arguments]);
54+
}
55+
}
5056
if (console.trace) console.trace();
5157
}
5258

dist/loglevel.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "loglevel",
33
"description": "Minimal lightweight logging for JavaScript, adding reliable log level methods to any available console.log methods",
4-
"version": "1.6.5",
4+
"version": "1.6.6",
55
"homepage": "https://github.com/pimterry/loglevel",
66
"author": {
77
"name": "Tim Perry",

0 commit comments

Comments
 (0)