Upload folder using huggingface_hub
Browse files
6.7.0/dataframe/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/dataframe",
|
| 3 |
-
"version": "0.21.
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/dataframe",
|
| 3 |
+
"version": "0.21.6",
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
6.7.0/dataframe/shared/utils/utils.ts
CHANGED
|
@@ -29,6 +29,9 @@ export type DataframeValue = {
|
|
| 29 |
* @returns The coerced value.
|
| 30 |
*/
|
| 31 |
export function cast_value_to_type(v: any, t: Datatype): CellValue {
|
|
|
|
|
|
|
|
|
|
| 32 |
if (t === "number") {
|
| 33 |
const n = Number(v);
|
| 34 |
return isNaN(n) ? v : n;
|
|
|
|
| 29 |
* @returns The coerced value.
|
| 30 |
*/
|
| 31 |
export function cast_value_to_type(v: any, t: Datatype): CellValue {
|
| 32 |
+
if (v === null || v === undefined) {
|
| 33 |
+
return v;
|
| 34 |
+
}
|
| 35 |
if (t === "number") {
|
| 36 |
const n = Number(v);
|
| 37 |
return isNaN(n) ? v : n;
|