|
@@ -164,7 +164,7 @@ export function getConferenceName(stateful: Function | Object): string {
|
164
|
164
|
|| subject
|
165
|
165
|
|| callDisplayName
|
166
|
166
|
|| (callee && callee.name)
|
167
|
|
- || _.startCase(safeDecodeURIComponent(room));
|
|
167
|
+ || safeStartCase(safeDecodeURIComponent(room));
|
168
|
168
|
}
|
169
|
169
|
|
170
|
170
|
/**
|
|
@@ -351,3 +351,19 @@ export function sendLocalParticipant(
|
351
|
351
|
|
352
|
352
|
conference.setDisplayName(name);
|
353
|
353
|
}
|
|
354
|
+
|
|
355
|
+/**
|
|
356
|
+ * A safe implementation of lodash#startCase that doesn't deburr the string.
|
|
357
|
+ *
|
|
358
|
+ * NOTE: According to lodash roadmap, lodash v5 will have this function.
|
|
359
|
+ *
|
|
360
|
+ * Code based on https://github.com/lodash/lodash/blob/master/startCase.js.
|
|
361
|
+ *
|
|
362
|
+ * @param {string} s - The string to do start case on.
|
|
363
|
+ * @returns {string}
|
|
364
|
+ */
|
|
365
|
+function safeStartCase(s = '') {
|
|
366
|
+ return _.words(`${s}`.replace(/['\u2019]/g, '')).reduce(
|
|
367
|
+ (result, word, index) => result + (index ? ' ' : '') + _.upperFirst(word)
|
|
368
|
+ , '');
|
|
369
|
+}
|