mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 04:45:08 +08:00
Fix opening pdf and pdf-form files
This commit is contained in:
@ -951,8 +951,11 @@ DE.ApplicationController = new(function(){
|
||||
});
|
||||
|
||||
window["flat_desine"] = true;
|
||||
var result = /[\?\&]fileType=\b(pdf|djvu|xps|oxps)\b&?/i.exec(window.location.search),
|
||||
isPDF = (!!result && result.length && typeof result[1] === 'string');
|
||||
var result = /[\?\&]fileType=\b(pdf)|(djvu|xps|oxps)\b&?/i.exec(window.location.search),
|
||||
docType = /[\?\&]documentType=\b(word)\b&?/i.exec(window.location.search),
|
||||
isPDF = (!!result && result.length && typeof result[2] === 'string') || (!!result && result.length && typeof result[1] === 'string') &&
|
||||
(!docType || !docType.length || typeof docType[1] !== 'string');
|
||||
|
||||
|
||||
api = isPDF ? new Asc.PDFEditorApi({
|
||||
'id-view' : 'editor_sdk',
|
||||
|
||||
@ -345,8 +345,8 @@ class MainController extends Component {
|
||||
|
||||
var result = /[\?\&]fileType=\b(pdf)|(djvu|xps|oxps)\b&?/i.exec(window.location.search),
|
||||
docType = /[\?\&]documentType=\b(word)\b&?/i.exec(window.location.search),
|
||||
isPDF = (!!result && result.length && typeof result[2] === 'string') || !!result && result.length && typeof result[1] === 'string' &&
|
||||
!!docType && docType.length && typeof docType[1] !== 'string';
|
||||
isPDF = (!!result && result.length && typeof result[2] === 'string') || (!!result && result.length && typeof result[1] === 'string') &&
|
||||
(!docType || !docType.length || typeof docType[1] !== 'string');
|
||||
|
||||
this.api = isPDF ? new Asc.PDFEditorApi({
|
||||
'id-view' : 'editor_sdk',
|
||||
|
||||
Reference in New Issue
Block a user