@saooti/octopus-sdk 38.0.12 → 38.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/sonarqube-scanner.js +1 -1
  3. package/src/App.vue +1 -1
  4. package/src/assets/bootstrap.scss +0 -1
  5. package/src/assets/general.scss +0 -1
  6. package/src/assets/share.scss +0 -1
  7. package/src/components/display/categories/CategoryFilter.vue +1 -1
  8. package/src/components/display/comments/AddCommentModal.vue +2 -2
  9. package/src/components/display/emission/EmissionList.vue +0 -1
  10. package/src/components/display/filter/CategorySearchFilter.vue +1 -1
  11. package/src/components/display/filter/ProductorSearch.vue +1 -1
  12. package/src/components/display/list/SwiperList.vue +0 -1
  13. package/src/components/display/live/LiveItem.vue +1 -1
  14. package/src/components/display/live/RadioPlanning.vue +0 -5
  15. package/src/components/display/participant/ParticipantItem.vue +1 -1
  16. package/src/components/display/participant/ParticipantList.vue +0 -1
  17. package/src/components/display/playlist/PlaylistList.vue +0 -1
  18. package/src/components/display/playlist/PodcastList.vue +0 -1
  19. package/src/components/display/podcasts/PodcastList.vue +0 -1
  20. package/src/components/display/sharing/QrCode.vue +1 -1
  21. package/src/components/display/sharing/SharePlayer.vue +3 -12
  22. package/src/components/display/sharing/SharePlayerRadio.vue +2 -8
  23. package/src/components/display/sharing/SharePlayerTypes.vue +5 -5
  24. package/src/components/form/ClassicInputText.vue +6 -9
  25. package/src/components/form/ClassicMultiselect.vue +1 -1
  26. package/src/components/form/ClassicSelect.vue +1 -1
  27. package/src/components/misc/modal/NewsletterModal.vue +5 -5
  28. package/src/components/misc/player/PlayerVideoDigiteka.vue +0 -26
  29. package/src/components/misc/player/PlayerVideoHls.vue +1 -1
  30. package/src/components/mixins/cookies.ts +1 -1
  31. package/src/components/mixins/player/playerComment.ts +1 -1
  32. package/src/components/mixins/player/playerLive.ts +3 -3
  33. package/src/components/mixins/player/playerLogic.ts +1 -2
  34. package/src/components/mixins/player/playerLogicProgress.ts +1 -1
  35. package/src/components/mixins/player/playerTranscript.ts +1 -1
  36. package/src/components/pages/EmissionPage.vue +3 -5
  37. package/src/components/pages/HomePage.vue +0 -2
  38. package/src/components/pages/PlaylistsPage.vue +1 -1
  39. package/src/components/pages/PodcastPage.vue +4 -9
  40. package/src/components/pages/PodcastsPage.vue +1 -1
  41. package/src/main.ts +1 -1
  42. package/src/stores/ParamSdkStore.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "38.0.12",
3
+ "version": "38.0.14",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -9,7 +9,7 @@ scanner({
9
9
  },
10
10
  serverUrl:"http://localhost:9000",
11
11
  login:"admin",
12
- password:"admin",
12
+ password:"saooti",
13
13
  options:{
14
14
  "sonar.sources":"./src"
15
15
  },
package/src/App.vue CHANGED
@@ -3,7 +3,7 @@
3
3
  <TopBar :is-education="false" />
4
4
  <CategoryFilter v-if="firstDisplayCategoryFilter" />
5
5
  <router-view />
6
- <ClassicLazy v-if="pageFullyLoad" :min-height="125" :unrender="true">
6
+ <ClassicLazy v-if="pageFullyLoad" :min-height="125">
7
7
  <FooterOctopus />
8
8
  </ClassicLazy>
9
9
  <PlayerComponent />
@@ -227,7 +227,6 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
227
227
  }
228
228
  .btn-twitter {
229
229
  background: #d2ecfc !important;
230
- //color: #1da1f2 !important;
231
230
  &:hover {
232
231
  background: #bbe3fb !important;
233
232
  }
@@ -176,7 +176,6 @@ body{
176
176
  flex-shrink: 0;
177
177
  @media (max-width: 960px) {
178
178
  flex-grow: 0;
179
- //margin-right: auto !important;
180
179
  }
181
180
  @media (max-width: 450px) {
182
181
  margin: auto;
@@ -64,7 +64,6 @@
64
64
  }
65
65
  .page-element{
66
66
  margin-top: 12rem;
67
- /* z-index: 1; */
68
67
  position: relative;
69
68
  }
70
69
 
@@ -173,7 +173,7 @@ export default defineComponent({
173
173
  return;
174
174
  }
175
175
  const filter = Array.from(this.filterRubrique);
176
- filter[index].rubriqueId = rubrique.rubriqueId || 0;
176
+ filter[index].rubriqueId = rubrique.rubriqueId ?? 0;
177
177
  this.filterUpdateRubrique(filter);
178
178
  const queryString = filter
179
179
  .map((value) => value.rubriquageId + ":" + value.rubriqueId)
@@ -109,8 +109,8 @@ export default defineComponent({
109
109
  if (!this.authProfile?.userId) {
110
110
  return;
111
111
  }
112
- this.name = `${this.authProfile?.firstname || ""} ${
113
- this.authProfile?.lastname || ""
112
+ this.name = `${this.authProfile?.firstname ?? ""} ${
113
+ this.authProfile?.lastname ?? ""
114
114
  }`.trim();
115
115
  this.isVerify = true;
116
116
  },
@@ -23,7 +23,6 @@
23
23
  v-for="e in displayArray"
24
24
  :key="e.emissionId"
25
25
  :min-height="250"
26
- :unrender="true"
27
26
  >
28
27
  <EmissionItem v-if="0 !== e.emissionId" :emission="e" />
29
28
  <template #preview>
@@ -70,7 +70,7 @@ export default defineComponent({
70
70
  }
71
71
  this.isInternChanged = true;
72
72
  this.iabId = this.filterIab ? this.filterIab.id : 0;
73
- this.isCategory = this.filterIab ? true : false;
73
+ this.isCategory = undefined !== this.filterIab;
74
74
  this.$emit("updateCategory", this.iabId);
75
75
  this.$nextTick(() => {
76
76
  this.isInternChanged = false;
@@ -111,7 +111,7 @@ export default defineComponent({
111
111
  }
112
112
  this.filterUpdateOrga({ orgaId: undefined });
113
113
  this.keepOrganisation = false;
114
- if (organisation && organisation.id) {
114
+ if (organisation?.id) {
115
115
  this.$emit("update:organisationId", organisation.id);
116
116
  if ("PUBLIC" !== organisation.privacy) {
117
117
  this.$nextTick(() => {
@@ -115,7 +115,6 @@ export default defineComponent({
115
115
  }
116
116
  .swiper-slide {
117
117
  display: flex;
118
- /* justify-content: center; */
119
118
  align-items: center;
120
119
  }
121
120
  </style>
@@ -49,7 +49,7 @@ export default defineComponent({
49
49
  this.watchInterval = undefined;
50
50
  },
51
51
  async fetchPodcastData(): Promise<void> {
52
- if (!this.fetchConference || !this.fetchConference.podcastId) return;
52
+ if (!this.fetchConference?.podcastId) return;
53
53
  try {
54
54
  this.live = await octopusApi.fetchData<Podcast>(
55
55
  0,
@@ -34,11 +34,6 @@
34
34
  <div class="program-item-date fw-bold flex-shrink-0">
35
35
  {{ dateDisplay(planningItem.startDate) }}
36
36
  </div>
37
- <!-- <component :is="
38
- planningItem.podcast.availability.visibility
39
- ? 'router-link'
40
- : 'div'
41
- " -->
42
37
  <router-link
43
38
  class="d-flex align-items-center text-dark"
44
39
  :to="{
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
  }`.trim();
82
82
  },
83
83
  editRight(): boolean {
84
- if (!this.participant || !this.participant.orga) {
84
+ if (!this.participant?.orga) {
85
85
  return false;
86
86
  }
87
87
  return (
@@ -21,7 +21,6 @@
21
21
  v-for="p in displayArray"
22
22
  :key="p.participantId"
23
23
  :min-height="360"
24
- :unrender="true"
25
24
  >
26
25
  <ParticipantItem v-if="0 !== p.participantId" :participant="p" />
27
26
  <template #preview>
@@ -19,7 +19,6 @@
19
19
  v-for="p in displayArray"
20
20
  :key="p.playlistId"
21
21
  :min-height="250"
22
- :unrender="true"
23
22
  >
24
23
  <PlaylistItem v-if="0 !== p.playlistId" :playlist="p" />
25
24
  <template #preview>
@@ -35,7 +35,6 @@
35
35
  v-for="p in podcastsDisplay"
36
36
  :key="p.podcastId"
37
37
  :min-height="410"
38
- :unrender="true"
39
38
  >
40
39
  <PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
41
40
  <template #preview>
@@ -25,7 +25,6 @@
25
25
  v-for="p in displayArray"
26
26
  :key="p.podcastId"
27
27
  :min-height="410"
28
- :unrender="true"
29
28
  >
30
29
  <PodcastItem v-if="0 !== p.podcastId" :podcast="p" />
31
30
  <template #preview>
@@ -89,7 +89,7 @@ export default defineComponent({
89
89
  ? this.authOrganisation.id
90
90
  : state.generalParameters.organisationId;
91
91
  const attributes = await this.getOrgaAttributes(orgaId ?? "");
92
- if (Object.prototype.hasOwnProperty.call(attributes, "COLOR")) {
92
+ if (Object.hasOwn(attributes, "COLOR")) {
93
93
  this.otherColor = attributes.COLOR as string;
94
94
  }
95
95
  },
@@ -177,10 +177,7 @@ export default defineComponent({
177
177
  return false;
178
178
  }
179
179
  return this.orgaAttributes &&
180
- Object.prototype.hasOwnProperty.call(
181
- this.orgaAttributes,
182
- "speechtotext.active",
183
- )
180
+ Object.hasOwn(this.orgaAttributes, "speechtotext.active")
184
181
  ? (this.orgaAttributes["speechtotext.active"] as boolean)
185
182
  : false;
186
183
  },
@@ -379,16 +376,10 @@ export default defineComponent({
379
376
  if (!this.orgaAttributes) {
380
377
  return;
381
378
  }
382
- this.color = Object.prototype.hasOwnProperty.call(
383
- this.orgaAttributes,
384
- "COLOR",
385
- )
379
+ this.color = Object.hasOwn(this.orgaAttributes, "COLOR")
386
380
  ? (this.orgaAttributes.COLOR as string)
387
381
  : "#40a372";
388
- this.theme = Object.prototype.hasOwnProperty.call(
389
- this.orgaAttributes,
390
- "THEME",
391
- )
382
+ this.theme = Object.hasOwn(this.orgaAttributes, "THEME")
392
383
  ? (this.orgaAttributes.THEME as string)
393
384
  : "#000000";
394
385
  },
@@ -94,16 +94,10 @@ export default defineComponent({
94
94
  if (!this.orgaAttributes) {
95
95
  return;
96
96
  }
97
- this.color = Object.prototype.hasOwnProperty.call(
98
- this.orgaAttributes,
99
- "COLOR",
100
- )
97
+ this.color = Object.hasOwn(this.orgaAttributes, "COLOR")
101
98
  ? (this.orgaAttributes.COLOR as string)
102
99
  : "#40a372";
103
- this.theme = Object.prototype.hasOwnProperty.call(
104
- this.orgaAttributes,
105
- "THEME",
106
- )
100
+ this.theme = Object.hasOwn(this.orgaAttributes, "THEME")
107
101
  ? (this.orgaAttributes.THEME as string)
108
102
  : "#000000";
109
103
  },
@@ -58,7 +58,7 @@ export default defineComponent({
58
58
  {
59
59
  name: this.$t("High version"),
60
60
  value: "videoLive",
61
- condition: this.podcast && this.podcast.podcastId,
61
+ condition: this.podcast?.podcastId,
62
62
  },
63
63
  ];
64
64
  },
@@ -77,22 +77,22 @@ export default defineComponent({
77
77
  {
78
78
  name: this.$t("Full Large version"),
79
79
  value: "largeMore",
80
- condition: this.podcast && this.podcast.podcastId,
80
+ condition: this.podcast?.podcastId,
81
81
  },
82
82
  {
83
83
  name: this.$t("Emission version"),
84
84
  value: "emission",
85
- condition: this.podcast && this.podcast.podcastId,
85
+ condition: this.podcast?.podcastId,
86
86
  },
87
87
  {
88
88
  name: this.$t("Large emission version"),
89
89
  value: "emissionLarge",
90
- condition: this.podcast && this.podcast.podcastId,
90
+ condition: this.podcast?.podcastId,
91
91
  },
92
92
  {
93
93
  name: this.$t("Large suggestion version"),
94
94
  value: "largeSuggestion",
95
- condition: this.podcast && this.podcast.podcastId,
95
+ condition: this.podcast?.podcastId,
96
96
  },
97
97
  ];
98
98
  },
@@ -154,16 +154,13 @@ export default defineComponent({
154
154
  return this.maxLength >= this.countValue;
155
155
  },
156
156
  valueRegexValid(): boolean {
157
- if (this.regex !== undefined) {
158
- if (!this.textValue || "" === this.textValue) {
159
- if (this.canBeNull) {
160
- return true;
161
- }
162
- return false;
163
- }
164
- return this.textValue.match(this.regex) !== null;
157
+ if (this.regex === undefined) {
158
+ return true;
165
159
  }
166
- return true;
160
+ if (!this.textValue || "" === this.textValue) {
161
+ return this.canBeNull;
162
+ }
163
+ return this.regex.exec(this.textValue) !== null;
167
164
  },
168
165
  },
169
166
  watch: {
@@ -90,7 +90,7 @@ export default {
90
90
 
91
91
  data() {
92
92
  return {
93
- optionSelected: undefined as unknown | undefined,
93
+ optionSelected: undefined as unknown,
94
94
  options: [] as Array<unknown>,
95
95
  remainingElements: 0 as number,
96
96
  isLoading: false as boolean,
@@ -52,7 +52,7 @@ export default defineComponent({
52
52
  const item = this.options.find((x) => {
53
53
  return this.textInit === x.value;
54
54
  });
55
- if (item && item.fontFamily) {
55
+ if (item?.fontFamily) {
56
56
  return "font-family:" + item.fontFamily;
57
57
  }
58
58
  return "";
@@ -226,13 +226,13 @@ export default defineComponent({
226
226
  return "";
227
227
  },
228
228
  description(): string {
229
- if (this.podcast && this.podcast.description) {
229
+ if (this.podcast?.description) {
230
230
  return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.podcast.description}</td></tr>`;
231
231
  }
232
- if (this.emission && this.emission.description) {
232
+ if (this.emission?.description) {
233
233
  return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.emission.description}</td></tr>`;
234
234
  }
235
- if (this.playlist && this.playlist.description) {
235
+ if (this.playlist?.description) {
236
236
  return `<tr><td colspan="2" valign="top" style="line-height:24px;font-size: 14px;max-width: 500px;">${this.playlist.description}</td></tr>`;
237
237
  }
238
238
  return "";
@@ -317,7 +317,7 @@ export default defineComponent({
317
317
  ? this.authOrganisation.id
318
318
  : state.generalParameters.organisationId;
319
319
  const attributes = await this.getOrgaAttributes(orgaId ?? "");
320
- if (Object.prototype.hasOwnProperty.call(attributes, "podcastmakerUrl")) {
320
+ if (Object.hasOwn(attributes, "podcastmakerUrl")) {
321
321
  this.shareUrl =
322
322
  attributes.podcastmakerUrl +
323
323
  window.location.pathname +
@@ -330,7 +330,7 @@ export default defineComponent({
330
330
  this.color = state.generalParameters.podcastmakerColor;
331
331
  return;
332
332
  }
333
- if (Object.prototype.hasOwnProperty.call(attributes, "COLOR")) {
333
+ if (Object.hasOwn(attributes, "COLOR")) {
334
334
  this.color = attributes.COLOR as string;
335
335
  }
336
336
  },
@@ -45,38 +45,12 @@ export default defineComponent({
45
45
  return "";
46
46
  },
47
47
  },
48
- watch: {
49
- /* srcVideo() {
50
- this.goFullScreen();
51
- }, */
52
- },
53
48
  mounted() {
54
49
  if (undefined === this.videoId) {
55
50
  (this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
56
51
  this.$t("Podcast play error"),
57
52
  );
58
53
  }
59
-
60
- /* this.goFullScreen(); */
61
- },
62
- methods: {
63
- /* goFullScreen() {
64
- if ("" === this.srcVideo) {
65
- return;
66
- }
67
- switch (screen.orientation.type) {
68
- case "landscape-primary":
69
- case "landscape-secondary":
70
- (this.$refs.iframeVideo as Element).requestFullscreen();
71
- break;
72
- case "portrait-secondary":
73
- case "portrait-primary":
74
- console.log("Portrait mode");
75
- break;
76
- default:
77
- console.log("The orientation API isn't supported in this browser :(");
78
- }
79
- }, */
80
54
  },
81
55
  });
82
56
  </script>
@@ -119,7 +119,7 @@ export default defineComponent({
119
119
  );
120
120
  this.player.on("error", (error) => {
121
121
  this.stopLive();
122
- if (error.description && error.description.includes("403")) {
122
+ if (error.description?.includes("403")) {
123
123
  this.errorPlay = this.$t("Video is unavailable");
124
124
  } else {
125
125
  this.errorPlay = this.$t("Podcast play error");
@@ -12,7 +12,7 @@ export default {
12
12
  const ca = document.cookie.split(";");
13
13
  for (const cookieValue of ca) {
14
14
  let c = cookieValue;
15
- while (c.charAt(0) == " ") c = c.substring(1, c.length);
15
+ while (c.startsWith(" ")) c = c.substring(1, c.length);
16
16
  if (0 === c.indexOf(nameEQ))
17
17
  return c.substring(nameEQ.length, c.length);
18
18
  }
@@ -63,7 +63,7 @@ export const playerComment = defineComponent({
63
63
  size: size,
64
64
  podcastId: podcastId,
65
65
  };
66
- if (!this.editRight(organisation ? organisation : "")) {
66
+ if (!this.editRight(organisation ?? "")) {
67
67
  param.status = ["Valid"];
68
68
  }
69
69
  const data = await octopusApi.postDataPublic<
@@ -77,7 +77,7 @@ export const playerLive = defineComponent({
77
77
  });
78
78
  }
79
79
  if (!Hls.isSupported()) {
80
- reject("Hls is not supported ! ");
80
+ reject(new Error("Hls is not supported ! "));
81
81
  }
82
82
  this.hls = new Hls();
83
83
  this.hls.on(Hls.Events.MANIFEST_PARSED, async () => {
@@ -89,7 +89,7 @@ export const playerLive = defineComponent({
89
89
  resolve();
90
90
  });
91
91
  this.hls.on(Hls.Events.ERROR, async () => {
92
- reject("There is an error while reading media content");
92
+ reject(new Error("There is an error while reading media content"));
93
93
  });
94
94
  this.hls.loadSource(hlsStreamUrl);
95
95
  });
@@ -100,7 +100,7 @@ export const playerLive = defineComponent({
100
100
  this.hls.destroy();
101
101
  this.hls = null;
102
102
  }else{
103
- await (audio as HTMLAudioElement).pause();
103
+ (audio as HTMLAudioElement).pause();
104
104
  }
105
105
  (audio as HTMLAudioElement).src = "";
106
106
  },
@@ -60,8 +60,7 @@ export const playerLogic = defineComponent({
60
60
  this.audioUrlToPlay = this.audioUrl;
61
61
  }
62
62
  if (
63
- !this.playerPodcast ||
64
- !this.playerPodcast.availability.visibility ||
63
+ !this.playerPodcast?.availability.visibility ||
65
64
  this.listenError
66
65
  ) {
67
66
  return;
@@ -76,7 +76,7 @@ export const playerLogicProgress = defineComponent({
76
76
  0,
77
77
  "podcast/download/live/" + this.playerLive.podcastId + ".m3u8",
78
78
  {
79
- downloadId: null !== downloadId ? downloadId : undefined,
79
+ downloadId: downloadId ?? undefined,
80
80
  origin: "octopus",
81
81
  distributorId: this.authOrgaId,
82
82
  },
@@ -28,7 +28,7 @@ export const playerTranscript = defineComponent({
28
28
  },
29
29
  parseSrt(transcript: string) {
30
30
  const pattern =
31
- /(\d+)\n([\d:,]+)\s+-{2}\>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;
31
+ /(\d+)\n([\d:,]+)\s+-{2}>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;
32
32
  const result = [];
33
33
  if (typeof transcript != "string") {
34
34
  return;
@@ -218,11 +218,9 @@ export default defineComponent({
218
218
  this.loaded = true;
219
219
  },
220
220
  handleAnnotations() {
221
- if (!this.emission || !this.emission.annotations) return;
222
- this.rssEmission =
223
- "RSS" === this.emission.annotations.SOURCE_KIND ? true : false;
224
- this.ftpEmission =
225
- "FTP" === this.emission.annotations.SOURCE_KIND ? true : false;
221
+ if (!this.emission?.annotations) return;
222
+ this.rssEmission = "RSS" === this.emission.annotations.SOURCE_KIND;
223
+ this.ftpEmission = "FTP" === this.emission.annotations.SOURCE_KIND;
226
224
  if (this.emission.annotations.exclusive) {
227
225
  this.exclusive = "true" === this.emission.annotations.exclusive;
228
226
  this.exclusive =
@@ -5,7 +5,6 @@
5
5
  v-for="(c, index) in categories"
6
6
  :key="c.id"
7
7
  :min-height="0"
8
- :unrender="true"
9
8
  :init-render-delay="3 < index ? 1000 : 0"
10
9
  >
11
10
  <PodcastInlineList
@@ -23,7 +22,6 @@
23
22
  v-for="(r, index) in rubriqueToShow"
24
23
  :key="r.rubriqueId"
25
24
  :min-height="0"
26
- :unrender="true"
27
25
  :init-render-delay="3 < index ? 1000 : 0"
28
26
  >
29
27
  <PodcastInlineList
@@ -56,7 +56,7 @@ export default defineComponent({
56
56
  return state.generalParameters.podcastmaker as boolean;
57
57
  },
58
58
  editRight(): boolean {
59
- return state.generalParameters.isPlaylist ? true : false;
59
+ return state.generalParameters.isPlaylist ?? false;
60
60
  },
61
61
  },
62
62
 
@@ -46,18 +46,13 @@
46
46
  :title="$t('More episodes of this emission')"
47
47
  :button-text="$t('All podcast emission button')"
48
48
  />
49
- <ClassicLazy :min-height="550" :unrender="true">
49
+ <ClassicLazy :min-height="550">
50
50
  <PodcastInlineList
51
51
  :podcast-id="podcastId"
52
52
  :title="$t('Suggested listening')"
53
53
  />
54
54
  </ClassicLazy>
55
- <ClassicLazy
56
- v-for="c in categories"
57
- :key="c.id"
58
- :min-height="550"
59
- :unrender="true"
60
- >
55
+ <ClassicLazy v-for="c in categories" :key="c.id" :min-height="550">
61
56
  <PodcastInlineList
62
57
  :iab-id="c.id"
63
58
  :href="'/main/pub/category/' + c.id"
@@ -157,7 +152,7 @@ export default defineComponent({
157
152
  isComments(): boolean {
158
153
  if (!this.podcast) return true;
159
154
  let podcastComment = "INHERIT";
160
- if (this.podcast.annotations && this.podcast.annotations.COMMENTS) {
155
+ if (this.podcast.annotations?.COMMENTS) {
161
156
  podcastComment = this.podcast.annotations.COMMENTS as string;
162
157
  }
163
158
  let organisationComment = "LIVE_ONLY";
@@ -322,7 +317,7 @@ export default defineComponent({
322
317
  9,
323
318
  "conference/" + this.podcast.conferenceId,
324
319
  );
325
- this.fetchConference = data ? data : { conferenceId: -1, title: "" };
320
+ this.fetchConference = data ?? { conferenceId: -1, title: "" };
326
321
  } catch {
327
322
  await this.fetchConferencePublic();
328
323
  }
@@ -126,7 +126,7 @@ export default defineComponent({
126
126
  this.searchPattern = this.searchInit ?? "";
127
127
  this.organisationId = this.productor ? this.productor : this.filterOrgaId;
128
128
  this.includeHidden =
129
- this.organisation && this.organisationRight ? true : false;
129
+ undefined !== this.organisation && this.organisationRight;
130
130
  this.iabId = this.filterIab?.id;
131
131
  if (this.filterRubrique.length) {
132
132
  this.updateRubriquageFilter(this.filterRubrique);
package/src/main.ts CHANGED
@@ -11,7 +11,7 @@ const ca = document.cookie.split(";");
11
11
  let language = "";
12
12
  for (const valueCookie of ca) {
13
13
  let c = valueCookie;
14
- while (c.charAt(0) == " ") c = c.substring(1, c.length);
14
+ while (c.startsWith(" ")) c = c.substring(1, c.length);
15
15
  if (0 === c.indexOf(nameEQ)) {
16
16
  language = c.substring(nameEQ.length, c.length);
17
17
  break;
@@ -266,7 +266,7 @@ const initialize = function initialize(initObject: ParamStore): Promise<void> {
266
266
  octopusApi.initialize(state.octopusApi);
267
267
  resolve();
268
268
  } catch (error) {
269
- reject();
269
+ reject(new Error());
270
270
  }
271
271
  } else {
272
272
  resolve();