Skip to content

Commit

Permalink
Fix Node regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdyer committed Dec 7, 2015
1 parent 10be667 commit 4433953
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ var create = function create(o) {
};

// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
if (!window.JSON) {
if (typeof window === "object" && !window.JSON) {
window.JSON = {
parse: function(sJSON) { return eval('(' + sJSON + ')'); },
stringify: (function () {
Expand Down
4 changes: 2 additions & 2 deletions lib/model.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 src/backward.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ var create = function create(o) {
};

// From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
if (!window.JSON) {
if (typeof window === "object" && !window.JSON) {
window.JSON = {
parse: function(sJSON) { return eval('(' + sJSON + ')'); },
stringify: (function () {
Expand Down

0 comments on commit 4433953

Please sign in to comment.