@quintype/components 3.8.1 → 3.8.3-test-branch.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -1106,11 +1106,12 @@ var InfiniteStoryBase = /*#__PURE__*/function (_React$Component) {
|
|
|
1106
1106
|
var _this2 = this;
|
|
1107
1107
|
|
|
1108
1108
|
var item = this.allItems()[index];
|
|
1109
|
+
console.log('aa--!this.props.doNotChangeUrl', !this.props.doNotChangeUrl);
|
|
1109
1110
|
|
|
1110
1111
|
if (!this.props.doNotChangeUrl) {
|
|
1111
|
-
var storyPath = item.story.url ? new URL(item.story.url).pathname :
|
|
1112
|
+
var storyPath = item.story.url ? new URL(item.story.url).pathname : '/' + item.story.slug;
|
|
1112
1113
|
var metaTitle = get__default["default"](item, ['story', 'seo', 'meta-title'], item.story.headline);
|
|
1113
|
-
var title = get__default["default"](item, [
|
|
1114
|
+
var title = get__default["default"](item, ['customSeo', 'title'], metaTitle);
|
|
1114
1115
|
var path = this.props.changeUrlTo ? this.props.changeUrlTo(item) : storyPath;
|
|
1115
1116
|
global.app.maybeSetUrl(path, title);
|
|
1116
1117
|
}
|
|
@@ -8,10 +8,10 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
10
|
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { InfiniteScroll } from "./infinite-scroll.js";
|
|
11
|
+
import get from 'lodash/get';
|
|
12
|
+
import React from 'react';
|
|
14
13
|
import { removeDuplicateStories } from '../utils';
|
|
14
|
+
import { InfiniteScroll } from './infinite-scroll.js';
|
|
15
15
|
/**
|
|
16
16
|
* This component can be used to implement InfiniteScroll on the story page. You will need to specify the function which renders the story (which will recieve props.index and props.story), and functions for triggering analytics.
|
|
17
17
|
*
|
|
@@ -106,11 +106,12 @@ export var InfiniteStoryBase = /*#__PURE__*/function (_React$Component) {
|
|
|
106
106
|
var _this2 = this;
|
|
107
107
|
|
|
108
108
|
var item = this.allItems()[index];
|
|
109
|
+
console.log('aa--!this.props.doNotChangeUrl', !this.props.doNotChangeUrl);
|
|
109
110
|
|
|
110
111
|
if (!this.props.doNotChangeUrl) {
|
|
111
|
-
var storyPath = item.story.url ? new URL(item.story.url).pathname :
|
|
112
|
+
var storyPath = item.story.url ? new URL(item.story.url).pathname : '/' + item.story.slug;
|
|
112
113
|
var metaTitle = get(item, ['story', 'seo', 'meta-title'], item.story.headline);
|
|
113
|
-
var title = get(item, [
|
|
114
|
+
var title = get(item, ['customSeo', 'title'], metaTitle);
|
|
114
115
|
var path = this.props.changeUrlTo ? this.props.changeUrlTo(item) : storyPath;
|
|
115
116
|
global.app.maybeSetUrl(path, title);
|
|
116
117
|
}
|