Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 73c5623

Browse files
Switch to JSON methods for cloning the object
Structured clone isn't supported on older Node versions
1 parent 3180d66 commit 73c5623

File tree

1 file changed

+3
-4
lines changed
  • packages/google-closure-compiler/test

1 file changed

+3
-4
lines changed

packages/google-closure-compiler/test/grunt.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ const mockGrunt = {
8686
function gruntTaskOptions(options) {
8787
options = options || {};
8888
return function(defaults) {
89-
const opts = structuredClone(defaults || {});
90-
return Object.assign(opts, options);
91-
}
89+
const baseOpts = JSON.parse(JSON.stringify(defaults || {}));
90+
return Object.assign(baseOpts, options);
91+
};
9292
}
9393

9494
function getGruntTaskObject(fileObj, options, asyncDone) {
@@ -105,7 +105,6 @@ function getGruntTaskObject(fileObj, options, asyncDone) {
105105

106106
describe('grunt-google-closure-compiler', function() {
107107
let originalCompilerRunMethod;
108-
let originalJsCompilerRunMethod;
109108
let platformUtilized;
110109

111110
before(() => {

0 commit comments

Comments
 (0)