1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +02:00

Import function correctly

There was a typo in the function's name which broke mentions.
This commit is contained in:
Alexander Skvortsov
2021-10-06 16:15:01 -04:00
parent 798fadbddc
commit 03c6db4c8d

View File

@@ -1,4 +1,4 @@
import getCleanDisplayName, { ShouldUseOldFormat } from './getCleanDisplayName'; import getCleanDisplayName, { shouldUseOldFormat } from './getCleanDisplayName';
/** /**
* Fetches the mention text for a specified user (and optionally a post ID for replies). * Fetches the mention text for a specified user (and optionally a post ID for replies).
@@ -20,7 +20,7 @@ import getCleanDisplayName, { ShouldUseOldFormat } from './getCleanDisplayName';
*/ */
export default function getMentionText(user, postId) { export default function getMentionText(user, postId) {
if (postId === undefined) { if (postId === undefined) {
if (ShouldUseOldFormat()) { if (shouldUseOldFormat()) {
// Plain @username // Plain @username
const cleanText = getCleanDisplayName(user, false); const cleanText = getCleanDisplayName(user, false);
return `@${cleanText}`; return `@${cleanText}`;