Skip to content

Commit

Permalink
Add Object.create() for IE8
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Aug 1, 2012
1 parent d8cec14 commit 05e3af7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions demo/js/js-yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ if (!Object.getOwnPropertyNames) {
return names;
};
}


if (!Object.create) {
Object.create = function () {
return {};
}
}
var jsyaml = window.jsyaml = (function () {
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || '/');
Expand Down
7 changes: 7 additions & 0 deletions js-yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ if (!Object.getOwnPropertyNames) {
return names;
};
}


if (!Object.create) {
Object.create = function () {
return {};
}
}
var jsyaml = window.jsyaml = (function () {
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || '/');
Expand Down
6 changes: 3 additions & 3 deletions js-yaml.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions support/browserify/30_extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ if (!Object.getOwnPropertyNames) {
return names;
};
}


if (!Object.create) {
Object.create = function () {
return {};
}
}

0 comments on commit 05e3af7

Please sign in to comment.