diff --git a/lib/index.js b/lib/index.js index 64330b2..79bfaa3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -68,8 +68,8 @@ const createCaptcha = function (text, options) { return xml; }; -const create = function (options) { - const text = random.captchaText(options); +const create = function (text, options) { + text = text || random.captchaText(options); const data = createCaptcha(text, options); return {text, data};