|
|
@@ -106,6 +106,7 @@ class PageService {
|
|
|
pageEvent.on('update', pageEvent.onUpdate);
|
|
|
}
|
|
|
|
|
|
+ this.validateCrowi();
|
|
|
const { _id, path } = pageData;
|
|
|
const socketClientId = options.socketClientId || null;
|
|
|
|
|
|
@@ -134,6 +135,12 @@ class PageService {
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
+ validateCrowi() {
|
|
|
+ if (this.crowi == null) {
|
|
|
+ throw new Error('"crowi" is null. Init User model with "crowi" argument first.');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
module.exports = PageService;
|