From ab90b331800ee491a8b7f2e454395b1f6a9557d0 Mon Sep 17 00:00:00 2001 From: Andrei Rybak Date: Tue, 3 Dec 2024 16:33:44 +0100 Subject: [PATCH] bitbucket-copy-commit-reference: BitbucketServer: call async convertPlainSubjectToHtml 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. --- bitbucket-copy-commit-reference.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbucket-copy-commit-reference.user.js b/bitbucket-copy-commit-reference.user.js index 14a4e5a..b7fca85 100644 --- a/bitbucket-copy-commit-reference.user.js +++ b/bitbucket-copy-commit-reference.user.js @@ -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 @@ -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); }