Skip to content

Commit

Permalink
feat: vin
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Feb 25, 2024
1 parent 2710761 commit 6c0fc72
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/layouts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,17 @@ class Index extends React.Component<Props, State> {
.then((res) => {
const content = res.trim();
if (content.startsWith('VIN:')) {
const vin = content.substr(4);
notification.warning({
message: 'Important Notice',
description: vin,
duration: null,
});
const vin = content.substr(4).trim();
vin &&
notification.warning({
message: 'Important Notice',
description: vin,
duration: null,
});
}
})
.catch((e) => {
console.log('No valid vin file, skip.', e);
console.log('No vin file, skip.', e);
});
}

Expand Down

0 comments on commit 6c0fc72

Please sign in to comment.