Skip to content

"Cannot read property 'children' of undefined" if static file have no dom #159

@wlekin

Description

@wlekin

i want to response plain string from a static file for ssl verify, however
virtual ( in \node_modules\blocks\node\blocks-node.js:11829:51 ) is null if static file have no dom, its a bug or i mess something up?

_setContents: function (contents) {
      var _this = this;
      var virtual = blocks.first(parseToVirtual(contents), function (child) {
        return VirtualElement.Is(child);
      });
      this._contents = contents;
      this._elementsById = getElementsById(virtual.children());
      findPageScripts(virtual, this._options.static, function (scripts) {
        _this._scripts = scripts;
        _this._initialized = true;
      });
    },

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions