Conversation
taoeffect
left a comment
There was a problem hiding this comment.
While the implementation of 'sbp/domains/lock' seems correct, this PR doesn't actually do any locking, but only gives the appearance of locking domains.
|
My bad, you're right. It seems like I forgot to update |
taoeffect
left a comment
There was a problem hiding this comment.
Fantastic work @snowteamer!! Thanks for updating the tests too! 😄
SBP is now one more step closer to perfection! 😁
| } | ||
| } else for (const name of typeof domainNameOrNames === 'string' ? [domainNameOrNames] : domainNameOrNames) { | ||
| if (!domains[name]) { | ||
| throw new Error(`SBP: unknown or invalid domain name: ${name}`) |
There was a problem hiding this comment.
Should probably simplify this error message to SBP: cannot lock non-existent domain: ${name}
| for (const domain of Object.values(domains)) { | ||
| domain.locked = true | ||
| } | ||
| } else for (const name of typeof domainNameOrNames === 'string' ? [domainNameOrNames] : domainNameOrNames) { |
There was a problem hiding this comment.
Hmm, this else should have a { after it, but I'll fix that in a followup.
| for (const selector in sels) { | ||
| const domain = domainFromSelector(selector) | ||
| if (selectors[selector]) { | ||
| const domainName = domainFromSelector(selector) |
There was a problem hiding this comment.
This actually breaks line 59 above:
if (selector === `${domain}/_init`) {We both forgot to run npm run flow which caught this error.
Closes #2