Fix for fetching submission info when runtime or memory percentile is null
Description
This pull request addresses an issue where fetching submission info results in a TypeError when either the runtime or memory percentile is null. The error occurs because the toFixed method is called on a null value, causing the script to crash.
Issue
The issue was reported in the following error message:
Root Cause
The root cause of this issue is that the getInfo function does not correctly handle cases where the runtimePercentile or memoryPercentile properties are null. When these values are null, calling the toFixed method on them results in a TypeError.
Fix
The fix involves adding a check to ensure that the runtimePercentile and memoryPercentile properties are not null or undefined before calling the toFixed method. If these properties are null or undefined, the function will return "N/A" instead.
Fix for fetching submission info when runtime or memory percentile is null
Description
This pull request addresses an issue where fetching submission info results in a
TypeError
when either the runtime or memory percentile isnull
. The error occurs because thetoFixed
method is called on anull
value, causing the script to crash.Issue
The issue was reported in the following error message:
Root Cause
The root cause of this issue is that the
getInfo
function does not correctly handle cases where theruntimePercentile
ormemoryPercentile
properties arenull
. When these values arenull
, calling thetoFixed
method on them results in aTypeError
.Fix
The fix involves adding a check to ensure that the
runtimePercentile
andmemoryPercentile
properties are notnull
orundefined
before calling thetoFixed
method. If these properties arenull
orundefined
, the function will return "N/A" instead.Addresses
This fix addresses issue #58