Skip to content

Commit

Permalink
Merge pull request #28 from AutomatonSystems/master
Browse files Browse the repository at this point in the history
Fix windowDropCB
  • Loading branch information
raub authored Jun 1, 2024
2 parents f3d0b53 + 278556d commit 410faae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpp/glfw-events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void windowDropCB(GLFWwindow *window, int count, const char **paths) {
Napi::Object dataTransfer = JS_OBJECT;
evt.Set("dataTransfer", dataTransfer);

Napi::Array list = Napi::Array();
Napi::Array list = JS_ARRAY;
for (int i = 0; i < count; i++) {
list.Set(i, paths[i]);
}
Expand All @@ -179,7 +179,7 @@ void windowDropCB(GLFWwindow *window, int count, const char **paths) {
evt.Set("effectAllowed", "all");
evt.Set("files", list);
evt.Set("items", list);
evt.Set("types", Napi::Array());
evt.Set("types", JS_ARRAY);

_emit(state, "drop", evt);
}
Expand Down

0 comments on commit 410faae

Please sign in to comment.