Skip to content

Commit 99ed275

Browse files
committed
Prevent changing objects in outer scope passed into a method.
1 parent 13a78c2 commit 99ed275

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openeo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class Connection {
219219
}
220220

221221
createJob(processGraph, outputFormat = null, outputParameters = {}, title = null, description = null, plan = null, budget = null, additional = {}) {
222-
var jobObject = Object.assign(additional, {
222+
var jobObject = Object.assign({}, additional, {
223223
title: title,
224224
description: description,
225225
process_graph: processGraph,
@@ -553,7 +553,7 @@ class Subscriptions {
553553
parameters = {};
554554
}
555555

556-
var payloadParameters = Object.assign(parameters, { topic: topic });
556+
var payloadParameters = Object.assign({}, parameters, { topic: topic });
557557

558558
this._sendMessage(action, {
559559
topics: [payloadParameters]

0 commit comments

Comments
 (0)