Skip to content

Allow empty strings as config values. - #8

Open
xim wants to merge 1 commit into
ufdada:masterfrom
xim:master
Open

Allow empty strings as config values.#8
xim wants to merge 1 commit into
ufdada:masterfrom
xim:master

Conversation

@xim

@xim xim commented Apr 24, 2017

Copy link
Copy Markdown

The way you assign default values to config does not permit empty string: quickWidth = conf.qtWidth || '500px';

E.g. if I set config.qtWidth = ''; I still get the value 500px as the default width.

config.qtWidth === undefined ? '500px' : config.qtWidth would allow empty border, width, etc.

As a workaround, I am using

config.qtBorder = [];
config.qtWidth = [];

This, however, adds an ugly and strange border to the preview and a border="" to the HTML. Would prefer to just add config.qtBorder = '';

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 this pull request may close these issues.

2 participants