Merge pull request #1352 from dermotduffy/seek-merge
Fix minor seeking issue in unreleased code
This commit is contained in:
+1
-1
@@ -178,7 +178,7 @@ export class View {
|
||||
* @returns This view.
|
||||
*/
|
||||
public mergeInContext(context?: ViewContext): View {
|
||||
this.context = merge(this.context ?? {}, this.context, context);
|
||||
this.context = merge({}, this.context, context);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,12 @@ describe('View Basics', () => {
|
||||
view.mergeInContext({ timeline: timelineContext });
|
||||
expect(view.context?.live).toEqual(liveContext);
|
||||
expect(view.context?.timeline).toEqual(timelineContext);
|
||||
|
||||
// Verify that merging context creates a new context object, as some
|
||||
// downstream users may check for context equality.
|
||||
const oldContext = view.context;
|
||||
view.mergeInContext({ live: liveContext });
|
||||
expect(view.context).not.toBe(oldContext);
|
||||
});
|
||||
|
||||
it('should remove context', () => {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export default defineConfig({
|
||||
// back-sliding.
|
||||
thresholdAutoUpdate: true,
|
||||
statements: 71.95,
|
||||
branches: 60.8,
|
||||
branches: 60.78,
|
||||
functions: 73.04,
|
||||
lines: 71.84,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user