We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65d8d76 commit b4c91ecCopy full SHA for b4c91ec
src/loadAttributes.js
@@ -31,14 +31,8 @@ const loadAttributes = (
31
entityRanges: Array<Object>,
32
entityMap: Object,
33
navigate?: Function): any => {
34
- let navigateFunction;
35
- if (navigate) {
36
- navigateFunction = navigate;
37
- } else {
38
- navigateFunction = (url: string) => {
39
- Linking.openURL(url);
40
- };
41
- }
+ const defaultNavigationFn = (url: string) => { Linking.openURL(url); };
+ const navigateFunction = navigate || defaultNavigationFn;
42
const elementList = [];
43
let attributes = inlineStyles ? inlineStyles.concat(entityRanges) : entityRanges;
44
attributes = attributes.sort((a: Object, b: Object): number => a.offset - b.offset);
0 commit comments