Skip to content

generateJsProps should use jsify(dartMap) #392

Description

@ryanheise

I've found that generateJsProps will produce an incorrect JsMap when one of the values in the Map is a JS constructor (a JavaScriptFunction in the Dart type system). However, jsify() produces the correct conversion. The following changes fix it:

class JsBackedMap extends MapBase<dynamic, dynamic> {
  JsBackedMap() : jsObject = js_util.jsify({});
  factory JsBackedMap.from(Map other) => JsBackedMap.backedBy(js_util.jsify(other));
  ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions