mirror of
https://github.com/Aviortheking/codestats-skyline.git
synced 2025-04-22 02:02:09 +00:00
fix: NaN Error while generating
Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
parent
d3963900e7
commit
9e81ea201d
@ -30,6 +30,8 @@ RUN npm run build
|
||||
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
|
6
main.ts
6
main.ts
@ -60,7 +60,7 @@ export const generateThingy = async (username: string, filterYear?: number): Pro
|
||||
if (month === '') {
|
||||
continue
|
||||
}
|
||||
correctedData[month] = Array(31).fill(0)
|
||||
correctedData[month] = Array(32).fill(0)
|
||||
}
|
||||
|
||||
// loop through each dates
|
||||
@ -104,6 +104,10 @@ export const generateThingy = async (username: string, filterYear?: number): Pro
|
||||
final += `text = "${username}";\n`
|
||||
final += `year = "${filterYear}";\n`
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log(final)
|
||||
}
|
||||
|
||||
// Fetch the CAD file
|
||||
let cadPath = './3d.scad'
|
||||
if (!await exists(cadPath)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user