File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,8 @@ MountOptionsDropdown.prototype = {
565565 this . setOptions ( mountOptions , visibleOptions , storage )
566566
567567 this . $el . appendTo ( $container )
568+
569+ this . _initialOptions = JSON . stringify ( this . getOptions ( ) )
568570 MountOptionsDropdown . _last = this
569571
570572 this . $el . trigger ( 'show' )
@@ -1472,11 +1474,14 @@ MountConfigListView.prototype = _.extend({
14721474 } )
14731475
14741476 dropDown . $el . on ( 'hide' , function ( ) {
1475- const mountOptions = dropDown . getOptions ( )
1477+ const newOptions = dropDown . getOptions ( )
1478+ const newOptionsStr = JSON . stringify ( newOptions )
14761479 $ ( 'body' ) . off ( 'mouseup.mountOptionsDropdown' )
1477- $tr . find ( 'input.mountOptions' ) . val ( JSON . stringify ( mountOptions ) )
14781480 $tr . find ( 'td.mountOptionsToggle>.icon-more' ) . attr ( 'aria-expanded' , 'false' )
1479- self . saveStorageConfig ( $tr )
1481+ if ( dropDown . _initialOptions !== newOptionsStr ) {
1482+ $tr . find ( 'input.mountOptions' ) . val ( newOptionsStr )
1483+ self . saveStorageConfig ( $tr )
1484+ }
14801485 } )
14811486 } ,
14821487} , OC . Backbone . Events )
You can’t perform that action at this time.
0 commit comments