fix: a new object should be created only when all conditions are met
fix: a new object should be created only when all conditions are met

ONLYOFFICE/sdkjs,ONLYOFFICE/sdkjs,ONLYOFFICE/sdkjs,ONLYOFFICE/sdkjs,ONLYOFFICE/sdkjs