Skip to content

Commit 31e17be

Browse files
committed
fix: fix #72
1 parent bf80228 commit 31e17be

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/legacy/api/LlAPI.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,14 @@ Local<Value> LlClass::getPluginInfo(const Arguments& args) {
157157
result.set("version", ver);
158158
result.set("versionStr", plugin->getManifest().version->to_string());
159159
result.set("filePath", plugin->getManifest().entry);
160-
161-
auto others = Object::newObject();
162-
for (const auto& [k, v] : *plugin->getManifest().extraInfo) {
163-
others.set(k, v);
160+
if (plugin->getManifest().extraInfo.has_value()) {
161+
auto others = Object::newObject();
162+
for (const auto& [k, v] : plugin->getManifest().extraInfo.value()) {
163+
others.set(k, v);
164+
}
165+
result.set("others", others);
164166
}
165-
result.set("others", others);
167+
166168
return result;
167169
}
168170
return {};

0 commit comments

Comments
 (0)