mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-04-07 14:04:30 +08:00
The author's name was duplicated
This commit is contained in:
@ -466,6 +466,18 @@ CitationItemData.prototype.fillFromObject = function (itemDataObject) {
|
||||
if (creator.lastName) {
|
||||
author.family = creator.lastName;
|
||||
}
|
||||
let bHasAuthor = self._author.some(function (a) {
|
||||
if (a.family !== author.family && (a.family || author.family)) {
|
||||
return false;
|
||||
}
|
||||
if (a.given !== author.given && (a.given || author.given)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (bHasAuthor) {
|
||||
return;
|
||||
}
|
||||
self._author.push(author);
|
||||
},
|
||||
this);
|
||||
|
||||
@ -11,6 +11,14 @@
|
||||
* @property {boolean} [`suppress-author`]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} InfoForCitationCluster
|
||||
* @property {string|number} id
|
||||
* @property {boolean} `suppress-author`
|
||||
* @property {string} [prefix]
|
||||
* @property {string} [suffix]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {string|number} id
|
||||
*/
|
||||
|
||||
@ -1,14 +1,6 @@
|
||||
// @ts-check
|
||||
/// <reference path="./citation-item.js" />
|
||||
|
||||
/**
|
||||
* @typedef {Object} InfoForCitationCluster
|
||||
* @property {string|number} id
|
||||
* @property {boolean} `suppress-author`
|
||||
* @property {string} [prefix]
|
||||
* @property {string} [suffix]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} CitationJsonData
|
||||
* @property {string} key
|
||||
|
||||
Reference in New Issue
Block a user