Skip to content

ejs-vue-base broken after 20.3.48 #91

@dennybiasiolli

Description

@dennybiasiolli

This commit breaks the library: 08dac8f#diff-8ce065eecc2fb15bf911535d1b27f523b3768918cb9a3d98e6cbb1e83c2ffab9R270-R275

Starting from that, we are constantly getting errors like this one in tests and runtime

 TypeError: Object prototype may only be an Object or null: undefined at setPrototypeOf (<anonymous>) 

I'm trying to contribute to the repository with a fix, but it's impossible to contribute to this repository without a proper documentation. Trying to install dependencies with npm i, but error with node version greater than 8.
Unable to build with npm run build.

Changing a piece of code of components/base/src/component-base.ts from this

 if (((/[s]\b/).test(tagRef) && innerDirValues) && (!(/[s]\b/).test(tagName) || innerDirValues.length)) { items[tagName] = tempObj; } else if (tempObj && Object.keys(tempObj).length !== 0) { items[tagName].push(tempObj); }

to this

 if (((/[s]\b/).test(tagRef) && innerDirValues) && (!(/[s]\b/).test(tagName) || innerDirValues.length)) { items[tagName] = tempObj; } else { items[tagName].push(tempObj); }

(basically changing it like this)

 if (((/[s]\b/).test(tagRef) && innerDirValues) && (!(/[s]\b/).test(tagName) || innerDirValues.length)) { items[tagName] = tempObj; - } - else if (tempObj && Object.keys(tempObj).length !== 0) { + } else { items[tagName].push(tempObj); }

Should work

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