Skip to content

Commit

Permalink
Merge pull request t4t5#553 from hermanzhu/master
Browse files Browse the repository at this point in the history
fix exception when use node. 'window is not defined'
  • Loading branch information
t4t5 committed Dec 1, 2016
2 parents 073760f + eb50011 commit 34b612c
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 175 deletions.
4 changes: 2 additions & 2 deletions dev/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ var isIE8 = function() {
* IE compatible logging for developers
*/
var logStr = function(string) {
if (window.console) {
if (typeof(window) !== 'undefined' && window.console) {
// IE...
window.console.log('SweetAlert: ' + string);
}
};

/*
* Set hover, active and focus-states for buttons
* Set hover, active and focus-states for buttons
* (source: http:https://www.sitepoint.com/javascript-generate-lighter-darker-color)
*/
var colorLuminance = function(hex, lum) {
Expand Down
Loading

0 comments on commit 34b612c

Please sign in to comment.