mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 06:12:08 +00:00
Add a null check
This commit is contained in:
@@ -184,7 +184,7 @@ public:
|
||||
outCachedData = { span.begin(), span.end() };
|
||||
isValidType = true;
|
||||
}
|
||||
} else if (auto* arrayBuffer = JSC::jsDynamicCast<JSC::JSArrayBuffer*>(cachedDataOpt)) {
|
||||
} else if (auto* arrayBuffer = JSC::jsDynamicCast<JSC::JSArrayBuffer*>(cachedDataOpt); arrayBuffer && arrayBuffer->impl()) {
|
||||
std::span<const uint8_t> span = arrayBuffer->impl()->span();
|
||||
outCachedData = { span.begin(), span.end() };
|
||||
isValidType = true;
|
||||
@@ -224,7 +224,6 @@ public:
|
||||
class ScriptOptions : public BaseOptions {
|
||||
public:
|
||||
std::optional<int64_t> timeout = std::nullopt;
|
||||
bool importModuleDynamically = false;
|
||||
bool produceCachedData = false;
|
||||
std::vector<uint8_t> cachedData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user