-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog permalink #55
Blog permalink #55
Conversation
src/Views/page.js
Outdated
if (!OPTS.has('dev')) { | ||
const domain = Req.server.split("/")[0] | ||
let href = undefined | ||
if (Object.hasOwn(page.values, "share") && page.values.share) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we checking page.values.share twice? (i would just use if (page.values.share))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's to check if it's also a truthy value. if page.values.share won't throw an exception then i can also do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok yes i can do that, pushing a change
src/navigate.js
Outdated
@@ -66,6 +66,7 @@ class ViewSlot { | |||
for (let x of items) { | |||
let a = document.createElement('a') | |||
a.href = x.href | |||
a.target = x['target'] ?? '_self' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- should just be x.target || '_self' (i don't use ?? anywhere else in the code (..i hope i had a good reason for this))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fineee
resolves #37