mirror of https://github.com/zulip/zulip.git
zjquery: Mock text more accurately.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
483f1d153d
commit
d16a730d81
|
@ -329,9 +329,11 @@ exports.make_new_elem = function (selector, opts) {
|
||||||
stop: function () {
|
stop: function () {
|
||||||
return self;
|
return self;
|
||||||
},
|
},
|
||||||
text: function (arg) {
|
text: function (...args) {
|
||||||
if (arg !== undefined) {
|
if (args.length !== 0) {
|
||||||
text = arg;
|
if (args[0] !== undefined) {
|
||||||
|
text = args[0].toString();
|
||||||
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
|
Loading…
Reference in New Issue