aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/News.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/News.ts')
-rw-r--r--src/models/News.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/models/News.ts b/src/models/News.ts
index d1ae6fcef..a6ff86dda 100644
--- a/src/models/News.ts
+++ b/src/models/News.ts
@@ -19,6 +19,10 @@ export default class News {
19 sticky: boolean = false; 19 sticky: boolean = false;
20 20
21 constructor(data: INews) { 21 constructor(data: INews) {
22 if (!data) {
23 throw Error('News config not valid');
24 }
25
22 if (!data.id) { 26 if (!data.id) {
23 throw Error('News requires Id'); 27 throw Error('News requires Id');
24 } 28 }