Skip to content

Commit

Permalink
Fix Unable to bridge NSNumber to Float (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Allenxuxu authored Dec 1, 2022
1 parent 3daafe8 commit d8f6ccd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
.dart_tool/

.idea/
.packages
.pub/

Expand Down
4 changes: 2 additions & 2 deletions macos/Classes/WindowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ public class WindowManager: NSObject, NSWindowDelegate {
}

if (args["x"] != nil && args["y"] != nil) {
frameRect.topLeft.x = CGFloat(args["x"] as! Float)
frameRect.topLeft.y = CGFloat(args["y"] as! Float)
frameRect.topLeft.x = CGFloat(truncating: args["x"] as! NSNumber)
frameRect.topLeft.y = CGFloat(truncating: args["y"] as! NSNumber)
}

if (animate) {
Expand Down

0 comments on commit d8f6ccd

Please sign in to comment.