aboutsummaryrefslogtreecommitdiffstats
path: root/includes/content/JavaScriptContentHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/content/JavaScriptContentHandler.php')
-rw-r--r--includes/content/JavaScriptContentHandler.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/includes/content/JavaScriptContentHandler.php b/includes/content/JavaScriptContentHandler.php
index 3c30bca5160b..c236d5b54504 100644
--- a/includes/content/JavaScriptContentHandler.php
+++ b/includes/content/JavaScriptContentHandler.php
@@ -67,9 +67,16 @@ class JavaScriptContentHandler extends CodeContentHandler {
Content $content,
PreSaveTransformParams $pstParams
): Content {
- $deprecatedContent = $this->maybeCallDeprecatedContentPST( $content, $pstParams );
- if ( $deprecatedContent ) {
- return $deprecatedContent;
+ $shouldCallDeprecatedMethod = $this->shouldCallDeprecatedContentTransformMethod(
+ $content,
+ $pstParams
+ );
+
+ if ( $shouldCallDeprecatedMethod ) {
+ return $this->callDeprecatedContentPST(
+ $content,
+ $pstParams
+ );
}
'@phan-var JavascriptContent $content';