Skip to content

'border' setter does not validate new value #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
churkin opened this issue Oct 23, 2020 · 0 comments · May be fixed by #208
Open

'border' setter does not validate new value #124

churkin opened this issue Oct 23, 2020 · 0 comments · May be fixed by #208

Comments

@churkin
Copy link

churkin commented Oct 23, 2020

Code:

const { CSSStyleDeclaration } = require('cssstyle');
const style = new CSSStyleDeclaration();

// NOTE: Throws exception
style.border = undefined;

// NOTE: Works fine
style.borderWidth = undefined;

Exception:

TypeError: Cannot read property 'toString' of undefined
    at CSSStyleDeclaration.set [as border] (/Users/andrey.churkin/Documents/git/dx-grid-error/node_modules/cssstyle/lib/properties.js:419:11)
    at Object.<anonymous> (/Users/andrey.churkin/Documents/git/dx-grid-error/index_css.js:4:14)
    at Module._compile (internal/modules/cjs/loader.js:1075:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1096:10)
    at Module.load (internal/modules/cjs/loader.js:940:32)
    at Function.Module._load (internal/modules/cjs/loader.js:781:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

Look here.

@asamuzaK asamuzaK linked a pull request May 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant