You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue using the stencil-utils/src/api/product.js aka utils.api.product.getById method because of the "this" keyword.
Please bind(this) on all class methods to keep scope in order.
/** * FOR EXAMPLE * after this line: https://github.com/bigcommerce/stencil-utils/blob/master/src/api/product.js#L13 * add the following code */this.getById=this.getById.bind(this);
This will prevent any issues with this referring to some outside Class
The text was updated successfully, but these errors were encountered:
I'm having an issue using the
stencil-utils/src/api/product.js
akautils.api.product.getById
method because of the "this" keyword.Please bind(this) on all class methods to keep scope in order.
This will prevent any issues with
this
referring to some outside ClassThe text was updated successfully, but these errors were encountered: