avoid over-optimize

pull/510/head
WittBulter 7 years ago
parent 5030bb7522
commit 12d7d93ebc

File diff suppressed because one or more lines are too long

@ -17138,8 +17138,7 @@ var SimpleMDE = function (_Action) {
// Don't include trailing separators // Don't include trailing separators
if (v === "|") { if (v === "|") {
var nonSeparatorIconsFollow = true; var nonSeparatorIconsFollow = true;
var toolbarLength = _this3.toolbar.length; for (var x = i + 1; x < _this3.toolbar.length; x++) {
for (var x = i + 1; x < toolbarLength; x++) {
if (_this3.toolbar[x] !== "|" && (!_this3.options.hideIcons || _this3.options.hideIcons.indexOf(name) == -1)) { if (_this3.toolbar[x] !== "|" && (!_this3.options.hideIcons || _this3.options.hideIcons.indexOf(name) == -1)) {
nonSeparatorIconsFollow = false; nonSeparatorIconsFollow = false;
} }
@ -17536,8 +17535,7 @@ exports.default = new (function () {
var count = 0; var count = 0;
if (m === null) return count; if (m === null) return count;
var mLength = m.length; for (var i = 0; i < m.length; i++) {
for (var i = 0; i < mLength; i++) {
if (m[i].charCodeAt(0) >= 0x4E00) { if (m[i].charCodeAt(0) >= 0x4E00) {
count += m[i].length; count += m[i].length;
} else { } else {

File diff suppressed because one or more lines are too long

@ -363,8 +363,7 @@ class SimpleMDE extends Action {
// Don't include trailing separators // Don't include trailing separators
if(v === "|") { if(v === "|") {
let nonSeparatorIconsFollow = true; let nonSeparatorIconsFollow = true;
const toolbarLength = this.toolbar.length for(let x = (i + 1); x < this.toolbar.length; x++) {
for(let x = (i + 1); x < toolbarLength; x++) {
if(this.toolbar[x] !== "|" && (!this.options.hideIcons || this.options.hideIcons.indexOf(name) == -1)) { if(this.toolbar[x] !== "|" && (!this.options.hideIcons || this.options.hideIcons.indexOf(name) == -1)) {
nonSeparatorIconsFollow = false; nonSeparatorIconsFollow = false;
} }

@ -25,8 +25,7 @@ export default new class Utils {
let count = 0; let count = 0;
if(m === null) return count; if(m === null) return count;
const mLength = m.length for(let i = 0; i < m.length; i++) {
for(let i = 0; i < mLength; i++) {
if(m[i].charCodeAt(0) >= 0x4E00) { if(m[i].charCodeAt(0) >= 0x4E00) {
count += m[i].length; count += m[i].length;
} else { } else {

Loading…
Cancel
Save