Replace loose equality (== null, != null) with strict equality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 09:22:36 +08:00
parent 3eec131ae0
commit 64372c7043
8 changed files with 20 additions and 20 deletions

View File

@@ -91,7 +91,7 @@
</section>
<!-- Loop group -->
<section>
<div v-if="data.loops == null"></div>
<div v-if="data.loops === null"></div>
<div v-else>
<p class="h2 text-base">Loop List</p>
<div class="border rounded border-neutral-300 p-2 bg-neutral-10 w-full">
@@ -138,12 +138,12 @@
</div>
<div v-else>
<div>
<div v-if="(data.issues?.length == 0 || data.issues == null) && data.timeTrend.chart == null"></div>
<div v-if="(data.issues?.length === 0 || data.issues === null) && data.timeTrend.chart === null"></div>
<p v-else="data.loops === null" class="h2 text-base">Non-conformance Issues</p>
</div>
<div class="flex w-full" :class="data.issues === null || data.issues?.length === 0 ? '' : 'gap-4'">
<!-- Issues chart -->
<div v-if="data.timeTrend.chart != null" class="border rounded border-neutral-300 p-2 bg-neutral-10" :class="data.issues === null || data.issues?.length === 0 ? 'w-full' : 'w-1/2'">
<div v-if="data.timeTrend.chart !== null" class="border rounded border-neutral-300 p-2 bg-neutral-10" :class="data.issues === null || data.issues?.length === 0 ? 'w-full' : 'w-1/2'">
<p class="h2 p-2 flex justify-between items-center">
<span>Time Trend<span class="material-symbols-outlined !text-sm align-middle ml-2" v-tooltip.bottom="tooltip.timeTrend">info</span></span>
<span class="text-2xl"><span class="text-cfm-secondary">{{ data.timeTrend.not_conforming }}</span>&nbsp/&nbsp{{ data.timeTrend.total }}</span>
@@ -284,7 +284,7 @@ export default {
watch: {
conformanceTempReportData: {
handler: function(newValue) {
if(newValue?.rule && newValue.rule.min != null) {
if(newValue?.rule && newValue.rule.min !== null) {
this.selectDurationTime = {
min: newValue.rule.min,
max: newValue.rule.max,