We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b45228e commit a040ea7Copy full SHA for a040ea7
lib/plugins/validators/async/22_imageSize.js
@@ -3,7 +3,6 @@ import { cache } from '../../../cache.js';
3
import mediaPlugin from '../media.js';
4
import * as urlLib from 'url';
5
6
-
7
export default {
8
9
startIteration: function(iterationPluginContext) {
@@ -98,6 +97,10 @@ export default {
98
97
99
// Special case: add rel image for image file with specific size.
100
if (link.rel.indexOf(CONFIG.R.image) === -1 && link.rel.indexOf(CONFIG.R.file) > -1 && data.width >= 100 && data.height >= 100) {
+ if (typeof link.rel.push !== 'function') {
101
+ throw new Error('link rel type error: "' + url + '" ' + JSON.stringify(link));
102
+ }
103
+
104
link.rel.push(CONFIG.R.image);
105
}
106
0 commit comments