Fix note context on settings page (#1241)

This commit is contained in:
toasted-nutbread 2021-01-15 17:30:43 -05:00 committed by GitHub
parent 1dcfbf6ba6
commit 9f202313c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,9 +173,9 @@ class AnkiTemplatesController {
if (definition !== null) { if (definition !== null) {
const options = await this._settingsController.getOptions(); const options = await this._settingsController.getOptions();
const context = { const context = {
document: { url: window.location.href,
title: document.title sentence: {text: definition.rawSource, offset: 0},
} documentTitle: document.title
}; };
let templates = options.anki.fieldTemplates; let templates = options.anki.fieldTemplates;
if (typeof templates !== 'string') { templates = this._defaultFieldTemplates; } if (typeof templates !== 'string') { templates = this._defaultFieldTemplates; }