Skip to content

Commit

Permalink
ロギングの0の扱いの不具合修正、だいたいラリー・ウォールのせい。
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanasu committed Jun 2, 2024
1 parent 013a203 commit a07fb5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/class/data-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class DataElement extends ObjectNode {
ret = `${this.value}`;
if (this.currentValue) ret += `(${modifire >= 0 ? '+' : ''}${modifire})`;
} else {
ret = this.value ? this.value.toString() : '';
ret = this.value == null ? '' : this.value.toString();
}
return ret;
}
Expand Down
10 changes: 5 additions & 5 deletions src/app/component/chat-input/chat-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ export class ChatInputComponent implements OnInit, OnDestroy {
//if (operator == '=') {
switch (operator) {
case '=':
target.value = (value == '' || parseInt(value) == 0 || StringUtil.toHalfWidth(value).toLowerCase() === 'off' || StringUtil.toHalfWidth(value).toLowerCase() === '☐') ? '' : target.name;
target.value = (value === '' || parseInt(value) === 0 || StringUtil.toHalfWidth(value).toLowerCase() === 'off' || StringUtil.toHalfWidth(value).toLowerCase() === '☐') ? '' : target.name;
break;
case '+':
target.value = target.name;
Expand All @@ -561,15 +561,15 @@ export class ChatInputComponent implements OnInit, OnDestroy {
}
} else if (operator === '=') {
if (target.isNote || target.isUrl) {
target.value = (isNaN(value) || target.isUrl) ? StringUtil.cr(value) : parseInt(value);
target.value = (isNaN(value) || value === '' || target.isUrl) ? StringUtil.cr(value) : parseInt(value);
} else {
target.value = isNaN(value) ? StringUtil.cr(value).replace(/(:?\r\n|\r|\n)/g, ' ') : parseInt(value);
target.value = (isNaN(value) || value === '') ? StringUtil.cr(value).replace(/(:?\r\n|\r|\n)/g, ' ') : parseInt(value);
}
} else {
throw `→ ${target.name == '' ? '(無名の変数)' : target.name} を操作 → コマンドエラー:` + command.operator + command.value;
throw `→ ${target.name === '' ? '(無名の変数)' : target.name} を操作 → コマンドエラー:` + command.operator + command.value;
}
const newValue = target.loggingValue;
let loggingText = `→ ${target.name == '' ? '(無名の変数)' : target.name} を操作`;
let loggingText = `→ ${target.name === '' ? '(無名の変数)' : target.name} を操作`;
if (isOperateNumber) {
loggingText += ` ${oldValue}${oldValue === newValue ? '変更なし' : newValue}`;
} else if (target.isCheckProperty) {
Expand Down

0 comments on commit a07fb5f

Please sign in to comment.