Skip to content

TRY_HARDER set twice. #38

@horrorhound

Description

@horrorhound

I've never forked and submitted a pull request and don't have time at the moment todo read up on that process... But wanted to just post this before I forget.

There are two TRY_HARDER settings; nothing big still, a few lines that could be removed though.

export function genHints(opt) {
const hints = new Map();
if (opt.TRY_HARDER) {
hints.set(ZXing.DecodeHintType.TRY_HARDER, opt.TRY_HARDER);
}

if (opt.ASSUME_CODE_39_CHECK_DIGIT) {
hints.set(ZXing.DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT, opt.ASSUME_CODE_39_CHECK_DIGIT);
}
if (opt.ASSUME_GS1) {
hints.set(ZXing.DecodeHintType.ASSUME_GS1, opt.ASSUME_GS1);
}
if (opt.CHARACTER_SET) {
hints.set(ZXing.DecodeHintType.CHARACTER_SET, opt.CHARACTER_SET);
}
if (opt.OTHER) {
hints.set(ZXing.DecodeHintType.OTHER, opt.OTHER);
}
if (opt.PURE_BARCODE) {
hints.set(ZXing.DecodeHintType.PURE_BARCODE, opt.PURE_BARCODE);
}
if (opt.RETURN_CODABAR_START_END) {
hints.set(ZXing.DecodeHintType.RETURN_CODABAR_START_END, opt.RETURN_CODABAR_START_END);
}
if (opt.TRY_HARDER) {
hints.set(ZXing.DecodeHintType.TRY_HARDER, opt.TRY_HARDER);
}

return hints;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions