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 @@ -554,6 +554,8 @@ MountOptionsDropdown.prototype = {
554554 this . setOptions ( mountOptions , visibleOptions , storage )
555555
556556 this . $el . appendTo ( $container )
557+
558+ this . _initialOptions = JSON . stringify ( this . getOptions ( ) )
557559 MountOptionsDropdown . _last = this
558560
559561 this . $el . trigger ( 'show' )
@@ -1464,11 +1466,14 @@ MountConfigListView.prototype = _.extend({
14641466 } )
14651467
14661468 dropDown . $el . on ( 'hide' , function ( ) {
1467- const mountOptions = dropDown . getOptions ( )
1469+ const newOptions = dropDown . getOptions ( )
1470+ const newOptionsStr = JSON . stringify ( newOptions )
14681471 $ ( 'body' ) . off ( 'mouseup.mountOptionsDropdown' )
1469- $tr . find ( 'input.mountOptions' ) . val ( JSON . stringify ( mountOptions ) )
14701472 $tr . find ( 'td.mountOptionsToggle>.icon-more' ) . attr ( 'aria-expanded' , 'false' )
1471- self . saveStorageConfig ( $tr )
1473+ if ( dropDown . _initialOptions !== newOptionsStr ) {
1474+ $tr . find ( 'input.mountOptions' ) . val ( newOptionsStr )
1475+ self . saveStorageConfig ( $tr )
1476+ }
14721477 } )
14731478 } ,
14741479} , OC . Backbone . Events )
You can’t perform that action at this time.
0 commit comments