Skip to content

Commit

Permalink
bitbucket-copy-commit-reference: BitbucketServer: call async convertP…
Browse files Browse the repository at this point in the history
…lainSubjectToHtml with await

Method convertPlainSubjectToHtml in class BitbucketServer incorrectly
calls the async method convertPlainSubjectToHtml of the super class
GitHosting.  This causes errors later in the method `#insertJiraLinks`.

Add missing `await` to the callsite to fix this issue.
  • Loading branch information
rybak committed Dec 3, 2024
1 parent 4a8fb2e commit ab90b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitbucket-copy-commit-reference.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Bitbucket: copy commit reference
// @namespace https://github.com/rybak/atlassian-tweaks
// @version 14
// @version 15
// @description Adds a "Copy commit reference" link to every commit page on Bitbucket Cloud and Bitbucket Server.
// @license AGPL-3.0-only
// @author Andrei Rybak
Expand Down Expand Up @@ -389,7 +389,7 @@
}

async convertPlainSubjectToHtml(plainTextSubject, commitHash) {
const escapedHtml = super.convertPlainSubjectToHtml(plainTextSubject);
const escapedHtml = await super.convertPlainSubjectToHtml(plainTextSubject);
return await this.#insertPrLinks(await this.#insertJiraLinks(escapedHtml), commitHash);
}

Expand Down

0 comments on commit ab90b33

Please sign in to comment.