TypeError: someobject.somefunction(…).then is not a functionIs there an “exists” function for jQuery?var functionName = function() vs function functionName() Set a default parameter value for a JavaScript functionWhat does the exclamation mark do before the function?Is there a standard function to check for null, undefined, or blank variables in JavaScript?I keep getting “Uncaught SyntaxError: Unexpected token o”Understanding unique keys for array children in React.jsElementNotVisibleError although visible in test browserelement.all always returning count as 0undefined error in protractor on using a gettext() function and using it in other file
Can I pay my credit card?
Why is vowel phonology represented in a trapezoid instead of a square?
Is Precocious Apprentice enough for Mystic Theurge?
How to pass store code to custom URL in magento 2
How to find the radius of this smaller circle?
Why is so much ransomware breakable?
Why does Taylor’s series “work”?
Polynomial division: Is this trick obvious?
Why can't I share a one use code with anyone else?
Why are there five extra turns in tournament Magic?
When the match time is called, does the current turn end immediately?
Is it standard for US-based universities to consider the ethnicity of an applicant during PhD admissions?
FIFO data structure in pure C
A latin word for "area of interest"
Why does string strummed with finger sound different from the one strummed with pick?
Is it standard to have the first week's pay indefinitely withheld?
Why is Drogon so much better in battle than Rhaegal and Viserion?
Holding rent money for my friend which amounts to over $10k?
Do high-wing aircraft represent more difficult engineering challenges than low-wing aircraft?
Usage of the relative pronoun "dont"
Is there an academic word that means "to split hairs over"?
AD: OU for system administrator accounts
Is it possible to pass a pointer to an operator as an argument like a pointer to a function?
How does the Heat Metal spell interact with a follow-up Frostbite spell?
TypeError: someobject.somefunction(…).then is not a function
Is there an “exists” function for jQuery?var functionName = function() vs function functionName() Set a default parameter value for a JavaScript functionWhat does the exclamation mark do before the function?Is there a standard function to check for null, undefined, or blank variables in JavaScript?I keep getting “Uncaught SyntaxError: Unexpected token o”Understanding unique keys for array children in React.jsElementNotVisibleError although visible in test browserelement.all always returning count as 0undefined error in protractor on using a gettext() function and using it in other file
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have created a utility function for getting the total size of the webtable using protractor and javascript.
this.getTableSize = function(tableElement, rowSelector, columnSelector)
return
row: tableElement.all(rowSelector).count(),
column : tableElement.all(columnSelector).count()
;
However on using the same function , i am geeting the error:
tableActions.getTableSize(table,by.css("tr"),by.css("th")).then(function(obj)
console.log(obj);
)
The error which i am getting is :
TypeError: tableActions.getTableSize(...).then is not a function
javascript protractor angular-promise
add a comment |
I have created a utility function for getting the total size of the webtable using protractor and javascript.
this.getTableSize = function(tableElement, rowSelector, columnSelector)
return
row: tableElement.all(rowSelector).count(),
column : tableElement.all(columnSelector).count()
;
However on using the same function , i am geeting the error:
tableActions.getTableSize(table,by.css("tr"),by.css("th")).then(function(obj)
console.log(obj);
)
The error which i am getting is :
TypeError: tableActions.getTableSize(...).then is not a function
javascript protractor angular-promise
Why do you callthen
on the result? It doesn't return a promise.
– tkausl
Mar 23 at 16:40
because it doesnt return a promise
– Kunal Mukherjee
Mar 23 at 16:52
add a comment |
I have created a utility function for getting the total size of the webtable using protractor and javascript.
this.getTableSize = function(tableElement, rowSelector, columnSelector)
return
row: tableElement.all(rowSelector).count(),
column : tableElement.all(columnSelector).count()
;
However on using the same function , i am geeting the error:
tableActions.getTableSize(table,by.css("tr"),by.css("th")).then(function(obj)
console.log(obj);
)
The error which i am getting is :
TypeError: tableActions.getTableSize(...).then is not a function
javascript protractor angular-promise
I have created a utility function for getting the total size of the webtable using protractor and javascript.
this.getTableSize = function(tableElement, rowSelector, columnSelector)
return
row: tableElement.all(rowSelector).count(),
column : tableElement.all(columnSelector).count()
;
However on using the same function , i am geeting the error:
tableActions.getTableSize(table,by.css("tr"),by.css("th")).then(function(obj)
console.log(obj);
)
The error which i am getting is :
TypeError: tableActions.getTableSize(...).then is not a function
javascript protractor angular-promise
javascript protractor angular-promise
asked Mar 23 at 16:36
ashish chauhanashish chauhan
327
327
Why do you callthen
on the result? It doesn't return a promise.
– tkausl
Mar 23 at 16:40
because it doesnt return a promise
– Kunal Mukherjee
Mar 23 at 16:52
add a comment |
Why do you callthen
on the result? It doesn't return a promise.
– tkausl
Mar 23 at 16:40
because it doesnt return a promise
– Kunal Mukherjee
Mar 23 at 16:52
Why do you call
then
on the result? It doesn't return a promise.– tkausl
Mar 23 at 16:40
Why do you call
then
on the result? It doesn't return a promise.– tkausl
Mar 23 at 16:40
because it doesnt return a promise
– Kunal Mukherjee
Mar 23 at 16:52
because it doesnt return a promise
– Kunal Mukherjee
Mar 23 at 16:52
add a comment |
2 Answers
2
active
oldest
votes
You need to correct your method to handle the promises correctly.
I assume that tableElement.all(rowSelector).count() returns a promise else you will have to handle the callbacks;
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Promise.all does not return the array of resolved data with bluebird promises so use.
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code asthis.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined
– ashish chauhan
Mar 23 at 17:16
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
No, native ones..
– ashish chauhan
Mar 23 at 17:26
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
|
show 6 more comments
The reason your code is failing is because you are using .then()
on a function that does not return a promise
.
Here's an example of a working promise
:
let promise1 = new Promise( (resolve, reject) =>
let dataReceivedSuccessfully = false;
if (dataReceivedSuccessfully)
resolve('Data Available!');
if (!dataReceivedSuccessfully)
reject('Data Corrupted!');
)
promise1.then( (success) =>
console.log(success);
).catch( (err) =>
console.log(err);
)
You can use this in your code to return a resolve
or reject
, and then you will be able to use .then()
.
https://medium.freecodecamp.org/promises-in-javascript-explained-277b98850de
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315959%2ftypeerror-someobject-somefunction-then-is-not-a-function%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to correct your method to handle the promises correctly.
I assume that tableElement.all(rowSelector).count() returns a promise else you will have to handle the callbacks;
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Promise.all does not return the array of resolved data with bluebird promises so use.
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code asthis.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined
– ashish chauhan
Mar 23 at 17:16
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
No, native ones..
– ashish chauhan
Mar 23 at 17:26
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
|
show 6 more comments
You need to correct your method to handle the promises correctly.
I assume that tableElement.all(rowSelector).count() returns a promise else you will have to handle the callbacks;
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Promise.all does not return the array of resolved data with bluebird promises so use.
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code asthis.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined
– ashish chauhan
Mar 23 at 17:16
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
No, native ones..
– ashish chauhan
Mar 23 at 17:26
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
|
show 6 more comments
You need to correct your method to handle the promises correctly.
I assume that tableElement.all(rowSelector).count() returns a promise else you will have to handle the callbacks;
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Promise.all does not return the array of resolved data with bluebird promises so use.
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
You need to correct your method to handle the promises correctly.
I assume that tableElement.all(rowSelector).count() returns a promise else you will have to handle the callbacks;
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
Promise.all does not return the array of resolved data with bluebird promises so use.
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return Promise.all([tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()]).then(function(data)
return
row: data[0],
column: data[1]
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
this.getTableSize = function (tableElement, rowSelector, columnSelector)
return ableElement.all(rowSelector).count().then(function(c)
return ableElement.all(columnSelector).count().then(function (c2)
return
row: c,
column: c2
)
)
;
tableActions.getTableSize(table, by.css("tr"), by.css("th")).then(function (obj)
console.log(obj);
)
edited Mar 23 at 17:26
answered Mar 23 at 16:51
AZ_AZ_
1,041310
1,041310
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code asthis.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined
– ashish chauhan
Mar 23 at 17:16
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
No, native ones..
– ashish chauhan
Mar 23 at 17:26
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
|
show 6 more comments
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code asthis.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined
– ashish chauhan
Mar 23 at 17:16
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
No, native ones..
– ashish chauhan
Mar 23 at 17:26
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code as
this.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined– ashish chauhan
Mar 23 at 17:16
Hi, yes tableElement.all(rowSelector).count() returns a promise. I ran the below code as
this.getTableSize = function (tableElement, rowSelector, columnSelector) return Promise.all(tableElement.all(rowSelector).count(), tableElement.all(columnSelector).count()). then(function(data) return row: data[0], column: data[1] ) .catch(function(reason) console.log(reason); ) ;
. And now its giving error as:TypeError: [object Object] is not iterable and also obj comes out to be undefined– ashish chauhan
Mar 23 at 17:16
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
are you using bluebird promise or native?@ashishchauhan
– AZ_
Mar 23 at 17:20
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
@ashishchauhan use another snippet if yes.
– AZ_
Mar 23 at 17:24
No, native ones..
– ashish chauhan
Mar 23 at 17:26
No, native ones..
– ashish chauhan
Mar 23 at 17:26
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
my bad it must be an array of promises, updated the code for first snippet @ashishchauhan
– AZ_
Mar 23 at 17:28
|
show 6 more comments
The reason your code is failing is because you are using .then()
on a function that does not return a promise
.
Here's an example of a working promise
:
let promise1 = new Promise( (resolve, reject) =>
let dataReceivedSuccessfully = false;
if (dataReceivedSuccessfully)
resolve('Data Available!');
if (!dataReceivedSuccessfully)
reject('Data Corrupted!');
)
promise1.then( (success) =>
console.log(success);
).catch( (err) =>
console.log(err);
)
You can use this in your code to return a resolve
or reject
, and then you will be able to use .then()
.
https://medium.freecodecamp.org/promises-in-javascript-explained-277b98850de
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
add a comment |
The reason your code is failing is because you are using .then()
on a function that does not return a promise
.
Here's an example of a working promise
:
let promise1 = new Promise( (resolve, reject) =>
let dataReceivedSuccessfully = false;
if (dataReceivedSuccessfully)
resolve('Data Available!');
if (!dataReceivedSuccessfully)
reject('Data Corrupted!');
)
promise1.then( (success) =>
console.log(success);
).catch( (err) =>
console.log(err);
)
You can use this in your code to return a resolve
or reject
, and then you will be able to use .then()
.
https://medium.freecodecamp.org/promises-in-javascript-explained-277b98850de
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
add a comment |
The reason your code is failing is because you are using .then()
on a function that does not return a promise
.
Here's an example of a working promise
:
let promise1 = new Promise( (resolve, reject) =>
let dataReceivedSuccessfully = false;
if (dataReceivedSuccessfully)
resolve('Data Available!');
if (!dataReceivedSuccessfully)
reject('Data Corrupted!');
)
promise1.then( (success) =>
console.log(success);
).catch( (err) =>
console.log(err);
)
You can use this in your code to return a resolve
or reject
, and then you will be able to use .then()
.
https://medium.freecodecamp.org/promises-in-javascript-explained-277b98850de
The reason your code is failing is because you are using .then()
on a function that does not return a promise
.
Here's an example of a working promise
:
let promise1 = new Promise( (resolve, reject) =>
let dataReceivedSuccessfully = false;
if (dataReceivedSuccessfully)
resolve('Data Available!');
if (!dataReceivedSuccessfully)
reject('Data Corrupted!');
)
promise1.then( (success) =>
console.log(success);
).catch( (err) =>
console.log(err);
)
You can use this in your code to return a resolve
or reject
, and then you will be able to use .then()
.
https://medium.freecodecamp.org/promises-in-javascript-explained-277b98850de
answered Mar 23 at 16:50
HybridHybrid
3,93221032
3,93221032
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
add a comment |
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
Thanks for the help:)
– ashish chauhan
Mar 23 at 17:50
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315959%2ftypeerror-someobject-somefunction-then-is-not-a-function%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why do you call
then
on the result? It doesn't return a promise.– tkausl
Mar 23 at 16:40
because it doesnt return a promise
– Kunal Mukherjee
Mar 23 at 16:52