Merge pull request #160 from mwittrien/patch-1

Fix canary crash issue
This commit is contained in:
Zack 2019-04-18 10:44:28 -04:00 committed by GitHub
commit a17689b0df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -2163,6 +2163,7 @@ var ClassNormalizer = (() => {
shouldIgnore(value) {
if (!isNaN(value)) return true;
if (value.endsWith("px") || value.endsWith("ch") || value.endsWith("em") || value.endsWith("ms")) return true;
if (value.startsWith("layerContainer-")) return true;
if (value.startsWith("#") && (value.length == 7 || value.length == 4)) return true;
if (value.includes("calc(") || value.includes("rgba")) return true;
return false;
@ -2460,7 +2461,8 @@ class V2 {
get MessageContentComponent() {return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty("disableButtons"));}
get TimeFormatter() {return this.WebpackModules.findByUniqueProperties(["dateFormat"]);}
get TooltipWrapper() {return this.WebpackModules.find(m => m.prototype && m.prototype.showDelayed);}
get TooltipWrapper() {return this.WebpackModules.find(m => m.prototype && m.prototype.showDelayed) || this.WebpackModules.find(m => m.prototype && m.prototype.renderTooltip)
;}
get NativeModule() {return this.WebpackModules.findByUniqueProperties(["setBadge"]);}
get Tooltips() {return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);}
get KeyGenerator() {return this.WebpackModules.find(m => m.toString && /"binary"/.test(m.toString()));}
@ -3692,6 +3694,7 @@ class V2Components {
}
onMouseEnter() {
if (!BDV2.Tooltips) return;
const {left, top, width, height} = this.node.getBoundingClientRect();
BDV2.Tooltips.show(id, {
position: side,
@ -3721,6 +3724,7 @@ class V2Components {
}
onMouseLeave() {
if (!BDV2.Tooltips) return;
BDV2.Tooltips.hide(id);
}