diff --git a/package.json b/package.json index 62a7f1b..b0a9f73 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "jspdf": "^2.3.1", "node-interval-tree": "^1.3.3", - "survey-core": "../survey-library/build/survey-core" + "survey-core": "latest" }, "devDependencies": { "@types/jest": "^23.3.3", diff --git a/src/survey.ts b/src/survey.ts index d507314..47fd640 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -1,4 +1,5 @@ -import { SurveyModel, Question, EventBase, hasLicense } from 'survey-core'; +import { SurveyModel, Question, EventBase } from 'survey-core'; +import * as SurveyCore from 'survey-core'; import { IDocOptions, DocController } from './doc_controller'; import { FlatSurvey } from './flat_layout/flat_survey'; import { PagePacker } from './page_layout/page_packer'; @@ -32,7 +33,8 @@ export class SurveyPDF extends SurveyModel { * > You can enable this property only if you have a SurveyJS PDF Generator [commercial license](https://surveyjs.io/pricing). It is illegal to enable this property without a license. */ public get haveCommercialLicense(): boolean { - if(!!hasLicense && hasLicense(2)) return true; + const f = SurveyCore.hasLicense; + if(!!f && f(2)) return true; return this._haveCommercialLicense; } public set haveCommercialLicense(val: boolean) {