File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -186,12 +186,12 @@ export default (
186
186
target : Element ,
187
187
options : Options = { }
188
188
) : CustomScrollAction [ ] => {
189
- const { scrollMode , block , inline , boundary } = {
190
- scrollMode : 'always' ,
191
- block : 'center' ,
192
- inline : 'nearest' ,
193
- ... options ,
194
- }
189
+ const {
190
+ scrollMode = 'always' ,
191
+ block = 'center' ,
192
+ inline = 'nearest' ,
193
+ boundary ,
194
+ } = options
195
195
// Allow using a callback to check the boundary
196
196
// The default behavior is to check if the current target matches the boundary element or not
197
197
// If undefined it'll check that target is never undefined (can happen as we recurse up the tree)
Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ const getOptions = (options: any = true): StandardBehaviorOptions => {
59
59
} else if ( options === false ) {
60
60
return { block : 'end' , inline : 'nearest' }
61
61
} else if ( isOptionsObject < StandardBehaviorOptions > ( options ) ) {
62
- return { block : 'center' , inline : 'nearest' , ...options }
62
+ // compute.ts ensures the defaults are block: 'center' and inline: 'nearest', to conform to the spec
63
+ return options
63
64
}
64
65
65
66
// if options = {}, based on w3c web platform test
You can’t perform that action at this time.
0 commit comments