mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 14:31:30 +03:00
Fix lock tooltip closure shadowing commit
variable
This commit is contained in:
parent
311a582a8c
commit
a91153aff3
@ -55,7 +55,7 @@
|
|||||||
<div class="indicators text-base-11">
|
<div class="indicators text-base-11">
|
||||||
<span class="added">+{added}</span>
|
<span class="added">+{added}</span>
|
||||||
<span class="removed">-{removed}</span>
|
<span class="removed">-{removed}</span>
|
||||||
{#if section.hunk.lockedTo && commits}
|
{#if section.hunk.lockedTo && section.hunk.lockedTo.length > 0 && commits}
|
||||||
<div
|
<div
|
||||||
use:tooltip={{
|
use:tooltip={{
|
||||||
text: getLockText(section.hunk.lockedTo, commits),
|
text: getLockText(section.hunk.lockedTo, commits),
|
||||||
|
@ -9,8 +9,8 @@ export function getLockText(hunkLocks: HunkLock | HunkLock[] | string, commits:
|
|||||||
const descriptions = locks
|
const descriptions = locks
|
||||||
.filter(unique)
|
.filter(unique)
|
||||||
.map((lock) => {
|
.map((lock) => {
|
||||||
const commit = commits.find((commit) => {
|
const commit = commits.find((c) => {
|
||||||
commit.id == lock.commitId;
|
return c.id == lock.commitId;
|
||||||
});
|
});
|
||||||
const shortCommitId = commit?.id.slice(0, 7);
|
const shortCommitId = commit?.id.slice(0, 7);
|
||||||
if (commit) {
|
if (commit) {
|
||||||
|
Loading…
Reference in New Issue
Block a user