Skip to content

Commit

Permalink
mount-manager: Make sure add-methods does not mutate objects
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Nov 21, 2016
1 parent 37ef692 commit 55a0199
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client/javascript/core/mount-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
* Creates a new mount object
*/
function createMountPoint(name, args, dynamic) {
args = Utils.cloneObject(args, true);

if ( name === null ) {
name = args.name;
}
Expand Down Expand Up @@ -332,7 +334,7 @@
opts = (function() {
var isMounted = true;

return Utils.argumentDefaults(opts, {
return Utils.argumentDefaults(Utils.cloneObject(opts, true), {
icon: 'places/server.png',
searchable: false,
unmount: function(done) {
Expand Down

0 comments on commit 55a0199

Please sign in to comment.