@glissandoo/lib 1.102.14 → 1.102.15

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.
@@ -12,4 +12,5 @@ export default class UserGroup extends GroupBasic<UserGroupData> {
12
12
  get role(): GroupPlayerRole;
13
13
  get isAdmin(): boolean;
14
14
  get joinedAt(): FirebaseFirestore.Timestamp;
15
+ get order(): number;
15
16
  }
@@ -33,5 +33,8 @@ class UserGroup extends basic_1.default {
33
33
  get joinedAt() {
34
34
  return this.data.joinedAt;
35
35
  }
36
+ get order() {
37
+ return this.data.order || 0;
38
+ }
36
39
  }
37
40
  exports.default = UserGroup;
@@ -7,4 +7,5 @@ export interface UserGroupData extends GroupBasicData {
7
7
  instruments: InstrumentId[];
8
8
  role: GroupPlayerRole;
9
9
  joinedAt: Timestamp;
10
+ order: number;
10
11
  }
@@ -42,11 +42,14 @@ class Notification extends Model_1.default {
42
42
  return this.photoURL.slice(0, 1) === '[' && this.photoURL.slice(-1) === ']';
43
43
  }
44
44
  get avatar() {
45
- if (!this.isAvatar) {
45
+ if (!this.isAvatar || !this.photoURL) {
46
46
  return null;
47
47
  }
48
- const params = this.photoURL.substr(1).slice(0, -1).split('.');
49
- return (0, lodash_1.get)(this.meta, [params[0], params[1]]) || null;
48
+ const [key1, key2] = this.photoURL.slice(1, -1).split('.');
49
+ if (!key1 || !key2) {
50
+ return null;
51
+ }
52
+ return (0, lodash_1.get)(this.meta, [key1, key2]) || null;
50
53
  }
51
54
  get title() {
52
55
  return this.getTranslationByAction('title');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.102.14",
3
+ "version": "1.102.15",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",