Webpack build for branch master: 780a311c0a

This commit is contained in:
Travis CI 2018-01-04 00:23:12 +00:00
parent cf17872d69
commit 5f3385f9d2
2 changed files with 12 additions and 17 deletions

View file

@ -1355,15 +1355,10 @@ class Util {
*/
static parseEmoji(text) {
if (text.includes('%')) text = decodeURIComponent(text);
if (text.includes(':')) {
const m = text.match(/<?(a)?:(\w{2,32}):(\d{17,19})>?/);
if (!m) {
return null;
}
return { animated: Boolean(m[1]), name: m[2], id: m[3] };
} else {
return { animated: false, name: text, id: null };
}
if (!text.includes(':')) return { animated: false, name: text, id: null };
const m = text.match(/<?(a)?:(\w{2,32}):(\d{17,19})>?/);
if (!m) return null;
return { animated: Boolean(m[1]), name: m[2], id: m[3] };
}
/**
@ -1462,11 +1457,11 @@ class Util {
* @private
*/
static makePlainError(err) {
const obj = {};
obj.name = err.name;
obj.message = err.message;
obj.stack = err.stack;
return obj;
return {
name: err.name,
message: err.message,
stack: err.stack,
};
}
/**
@ -1596,8 +1591,8 @@ class Util {
* @private
*/
static basename(path, ext) {
let f = splitPathRe.exec(path).slice(1)[2];
if (ext && f.substr(-1 * ext.length) === ext) f = f.substr(0, f.length - ext.length);
let f = splitPathRe.exec(path)[3];
if (ext && f.endsWith(ext)) f = f.slice(0, -ext.length);
return f;
}

File diff suppressed because one or more lines are too long