diff --git a/shell/common/gin_converters/file_path_converter.h b/shell/common/gin_converters/file_path_converter.h index 2341ff599bcb..e8780b8f8c7f 100644 --- a/shell/common/gin_converters/file_path_converter.h +++ b/shell/common/gin_converters/file_path_converter.h @@ -23,9 +23,8 @@ struct Converter { if (val->IsNull()) return true; - v8::String::Value str(isolate, val); - if (str.length() == 0) { - *out = base::FilePath(); + if (val->IsString() && v8::Local::Cast(val)->Length() == 0) { + *out = {}; return true; }