Skip to content

Commit affe36f

Browse files
committed
fix: fix #74
1 parent 31e17be commit affe36f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/legacy/api/LlAPI.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,13 @@ Local<Value> LlClass::getAllPluginInfo(const Arguments& args) {
207207
pluginObject.set("versionStr", plugin.getManifest().version->to_string());
208208
pluginObject.set("filePath", plugin.getManifest().entry);
209209

210-
auto others = Object::newObject();
211-
for (const auto& [k, v] : *plugin.getManifest().extraInfo) {
212-
others.set(k, v);
210+
if (plugin.getManifest().extraInfo.has_value()) {
211+
auto others = Object::newObject();
212+
for (const auto& [k, v] : plugin.getManifest().extraInfo.value()) {
213+
others.set(k, v);
214+
}
215+
pluginObject.set("others", others);
213216
}
214-
pluginObject.set("others", others);
215217

216218
// Add plugin object to list
217219
plugins.add(pluginObject);

0 commit comments

Comments
 (0)