Skip to content

Commit

Permalink
v1.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Nov 7, 2019
1 parent fdd97e5 commit e9100d4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ v1.6.4 - Ensure package.json's 'main' is a fully qualified path, to fix webpack

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

v1.6.6 - Fix bugs in v1.6.5, which caused issues in node.js & IE < 9

## License
Copyright (c) 2013 Tim Perry
Licensed under the MIT license.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "loglevel",
"version": "1.6.5",
"version": "1.6.6",
"main": "dist/loglevel.min.js",
"dependencies": {},
"ignore": [
Expand Down
16 changes: 11 additions & 5 deletions dist/loglevel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! loglevel - v1.6.5 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
/*! loglevel - v1.6.6 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
(function (root, definition) {
"use strict";
if (typeof define === 'function' && define.amd) {
Expand All @@ -14,9 +14,8 @@
// Slightly dubious tricks to cut down minimized file size
var noop = function() {};
var undefinedType = "undefined";
var isIE = (
window.navigator.userAgent.indexOf('Trident/') >= 0 ||
window.navigator.userAgent.indexOf('MSIE ') >= 0
var isIE = (typeof window !== undefinedType) && (
/Trident\/|MSIE /.test(window.navigator.userAgent)
);

var logMethods = [
Expand Down Expand Up @@ -46,7 +45,14 @@

// Trace() doesn't print the message in IE, so for that case we need to wrap it
function traceForIE() {
if (console.log) console.log.apply(console, arguments);
if (console.log) {
if (console.log.apply) {
console.log.apply(console, arguments);
} else {
// In old IE, native console methods themselves don't have apply().
Function.prototype.apply.apply(console.log, [console, arguments]);
}
}
if (console.trace) console.trace();
}

Expand Down
4 changes: 2 additions & 2 deletions dist/loglevel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loglevel",
"description": "Minimal lightweight logging for JavaScript, adding reliable log level methods to any available console.log methods",
"version": "1.6.5",
"version": "1.6.6",
"homepage": "https://github.com/pimterry/loglevel",
"author": {
"name": "Tim Perry",
Expand Down

0 comments on commit e9100d4

Please sign in to comment.