fix(web): count the scoped mutate branch and draw the breadcrumb separator as a hairline
Awaiting inside each arm of the scope ternary left v8 with a negative else count on the response check, which the coverage gate read as an uncovered branch; the request is now chosen first and awaited once. The breadcrumb separator was a 1px filled divider where every other neutral line is 0.5px.
This commit is contained in:
1 parent
654ec0d8c1
commit
e1c3ec00e2
2 files changed
+8
-5
No files matched your search
+1
-1
@@ -487,7 +487,7 @@
|
||||
}
|
||||
|
||||
.crumbSep {
|
||||
width: 1px;
|
||||
width: 0.5px;
|
||||
height: 12px;
|
||||
background: var(--dsw-alias-border-l3);
|
||||
}
|
||||
|
||||
@@ -132,10 +132,13 @@ export class SettingsScopeController<T> implements SettingsScope<T> {
|
||||
return this.enqueue(async () => {
|
||||
const revision = expectedRevision ?? this.pendingRevision ?? this.getSnapshot().revision
|
||||
// The wire method takes an optional trailing scope; the global instance
|
||||
// sends three arguments rather than an explicit undefined.
|
||||
const response = this.spec.scope === undefined
|
||||
? await this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision)
|
||||
: await this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision, this.spec.scope)
|
||||
// sends three arguments rather than an explicit undefined. One await
|
||||
// after the choice: awaiting inside each arm splits the continuation so
|
||||
// that v8 counts the branch below it negative.
|
||||
const request = this.spec.scope === undefined
|
||||
? this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision)
|
||||
: this.ctx.remote.settings.mutate(this.spec.namespace, ownedOps, revision, this.spec.scope)
|
||||
const response = await request
|
||||
if (!response.ok) {
|
||||
await this.recover(generation)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user