Skip to content

generateJsProps should use jsify(dartMap) #392

@ryanheise

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));
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions