Comments (20)
I’ll investigate that deeper. Maybe there is a chance to use polyfill. Stay tuned.
from sfdc-lax.
@rsoesemann ok, there is available implementation for situation like we have.
https://www.npmjs.com/package/promise.prototype.finally
I’ll try to use that lib, I think.
from sfdc-lax.
Otherwise I have to remove lax from the product 😰
from sfdc-lax.
I'll try to fix that. In another case, you could avoid of .finally
usage. Or use LaxActionBuilder
which doesn't rely on Promise API
from sfdc-lax.
It worked. You are AWESOME.
from sfdc-lax.
@rsoesemann is it working in Chrome/Safari?
from sfdc-lax.
Yes!
from sfdc-lax.
Got it. I will watch on that asap. Thank you!
from sfdc-lax.
@rsoesemann
I would guess that Firefox is not compatible with Promise.prototype.finally
function:
See answer - https://stackoverflow.com/questions/22516959/how-to-determine-if-a-promise-is-supported-by-the-browser
Also, the link to the Firefox releases - https://wiki.mozilla.org/RapidRelease/Calendar
Release date: 2016-01-25
As soon as in the answer on StackOverflow:
Update Nov 14 - 2016: Chrome, Firefox, Safari and IE all now have experimental support for promises in their dev channels. The specification has settled. I would still not rely on the implementation just yet and would use a library but this might change in a few months.
Do you have client that still work on this old version?
from sfdc-lax.
Promise.prototype.finally
is part of ES2016+. And unfortunatelly it is not compatible with Firefox 47.
from sfdc-lax.
Thanks for digging in so deep. Yes we have a customer using this browser but this is enough material to convince him to upgrade. I hope...
from sfdc-lax.
Anychance for us to work around this on customers who stay on a shitty ff version? We use your lib everywhere 😬
from sfdc-lax.
Is this also a problem with standard salesforce promises? If so it should be excluded from salesforce supported browsers. Is it?
from sfdc-lax.
That would be a workaround for the FF 47 issue? Good luck.
from sfdc-lax.
Yep, that would be a workaround for all browsers that do not support Promise.prototype.finally
I hope to simplify that, cuz this lib has a lot of logic. It may be an overhead for the component
from sfdc-lax.
When you say I can use LaxActionBuilder
does this mean I can use its newly released "finally" as well?
from sfdc-lax.
@rsoesemann exactly!
See .finallyCallback
. The is the simple function without any Promise API logic.
sfdc-lax/src/aura/lax/laxHelper.js
Lines 89 to 119 in de46fac
from sfdc-lax.
@rsoesemann just released v1.2.2 with Promise.prototype.finally
polyfill for non-compatible browsers.
I've tested on the FF47 and that is working fine.
See examples
branch with tests: https://github.com/ruslan-kurchenko/sfdc-lax/blob/examples/src/aura/PromiseFinallyComponent/PromiseFinallyComponentController.js
from sfdc-lax.
@rsoesemann let me know if something went wrong with this update.
from sfdc-lax.
Thanks a lot. I will test tommorow.
from sfdc-lax.
Related Issues (20)
- Finally doesn't work as expected HOT 3
- Add the link to Deploy to SalesforceDX
- Questions about storable and background actions HOT 3
- Is there a finally on "cmp.lax.action"? HOT 1
- setFinally function for LaxActionBuilder HOT 3
- [extension] Make LAX code "compliant" with Lightning Linter HOT 2
- How to JS-throw error in then() to be catched in catch() HOT 6
- Add error parser / normaliser HOT 2
- Add a flag to automatically `JSON.parse` response from Apex HOT 2
- Add an ability to hook into the Apex/Lds/CreateComponent Actions process HOT 11
- Winter 19
- "Freeze JavaScript Prototypes" Session Setting in Winter '19 breaks Lax HOT 6
- Add record reload method to LDS helper HOT 3
- Recommended Migration to Lightning Web Components HOT 3
- Error overriding Promise prototype methods when "Freeze JavaScript Prototypes" is on HOT 2
- An ability to call Lightning Data Service component function within Lax context HOT 1
- An ability to set action callback without Aura context wrapper - `$A.getCallback()`
- An option to handle `"INCOMPLETE"` server-side action state in `.catch()` callback HOT 1
- An ability to fire an Application/Component event using Builder Pattern manner HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfdc-lax.