We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a040ea7 commit dbc80d0Copy full SHA for dbc80d0
lib/plugins/validators/async/22_imageSize.js
@@ -3,6 +3,7 @@ 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) {
@@ -97,10 +98,6 @@ export default {
97
98
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