FIX: Pass ajax function to loadOneboxes (#12199)

When enable_diffhtml_preview is true, oneboxes failed to load because a
wrong parameter was passed.

This commit also unhides enable_diffhtml_preview.
This commit is contained in:
Bianca Nenciu 2021-02-24 21:42:09 +02:00 committed by GitHub
parent 0c8d658ba8
commit dc7e3fab50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import { ajax } from "discourse/lib/ajax";
import {
caretPosition,
clipboardHelpers,
@ -404,7 +405,7 @@ export default Component.extend({
resolveCachedShortUrls(this.siteSettings, cookedElement);
loadOneboxes(
cookedElement,
null,
ajax,
null,
null,
this.siteSettings.max_oneboxes_per_post,

View File

@ -977,7 +977,6 @@ posting:
default: false
client: true
enable_diffhtml_preview:
hidden: true
default: false
client: true
old_post_notice_days: