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 () {
|
||||
return self;
|
||||
},
|
||||
text: function (arg) {
|
||||
if (arg !== undefined) {
|
||||
text = arg;
|
||||
text: function (...args) {
|
||||
if (args.length !== 0) {
|
||||
if (args[0] !== undefined) {
|
||||
text = args[0].toString();
|
||||
}
|
||||
return self;
|
||||
}
|
||||
return text;
|
||||
|
|
Loading…
Reference in New Issue