-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for https://github.com/Yoast/yoast-acf-analysis/issues/26 #38
Fix for https://github.com/Yoast/yoast-acf-analysis/issues/26 #38
Conversation
js/yoast-acf-analysis.js
Outdated
@@ -807,4 +808,5 @@ var isTinyMCEAvailable = function(editorID) { | |||
}; | |||
|
|||
module.exports = Scraper; | |||
},{"./../scraper-store.js":11}]},{},[9]); | |||
},{"./../scraper-store.js":11}]},{},[9]) | |||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJqcy9zcmMvYXBwLmpzIiwianMvc3JjL2NhY2hlL2NhY2hlLmF0dGFjaG1lbnRzLmpzIiwianMvc3JjL2NhY2hlL2NhY2hlLmpzIiwianMvc3JjL2NvbGxlY3QvY29sbGVjdC12NC5qcyIsImpzL3NyYy9jb2xsZWN0L2NvbGxlY3QtdjUuanMiLCJqcy9zcmMvY29sbGVjdC9jb2xsZWN0LmpzIiwianMvc3JjL2NvbmZpZy9jb25maWcuanMiLCJqcy9zcmMvaGVscGVyLmpzIiwianMvc3JjL21haW4uanMiLCJqcy9zcmMvcmVwbGFjZXZhcnMuanMiLCJqcy9zcmMvc2NyYXBlci1zdG9yZS5qcyIsImpzL3NyYy9zY3JhcGVyL3NjcmFwZXIuZW1haWwuanMiLCJqcy9zcmMvc2NyYXBlci9zY3JhcGVyLmdhbGxlcnkuanMiLCJqcy9zcmMvc2NyYXBlci9zY3JhcGVyLmltYWdlLmpzIiwianMvc3JjL3NjcmFwZXIvc2NyYXBlci50YXhvbm9teS5qcyIsImpzL3NyYy9zY3JhcGVyL3NjcmFwZXIudGV4dC5qcyIsImpzL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nJztcblxuICAgICAgICBmaWVsZC4kZWwuZmluZCgnLmFjZi1nYWxsZXJ5LWF0dGFjaG1lbnQgaW5wdXRbdHlwZT1oaWRkZW5dJykuZWFjaCggZnVuY3Rpb24gKGluZGV4LCBlbGVtZW50KXtcblxuICAgICAgICAgICAgLy9UT0RPOiBJcyB0aGlzIHRoZSBiZXN0IHdheSB0byBnZXQgdGhlIGF0dGFjaG1lbnQgaWQ/XG4gICAgICAgICAgICB2YXIgYXR0YWNobWVudF9pZCA9IGpRdWVyeSggdGhpcyApLnZhbCgpO1xuXG4gICAgICAgICAgICAvL0NvbGxlY3QgYWxsIGF0dGFjaG1lbnQgaWRzIGZvciBjYWNoZSByZWZyZXNoXG4gICAgICAgICAgICBhdHRhY2htZW50X2lkcy5wdXNoKGF0dGFjaG1lbnRfaWQpO1xuXG4gICAgICAgICAgICAvL0lmIHdlIGhhdmUgdGhlIGF0dGFjaG1lbnQgZGF0YSBpbiB0aGUgY2FjaGUgd2UgY2FuIHJldHVybiBhIHVzZWZ1bCB2YWx1ZVxuICAgICAgICAgICAgaWYoYXR0YWNobWVudENhY2hlLmdldChhdHRhY2htZW50X2lkLCAnYXR0YWNobWVudCcpKXtcblxuICAgICAgICAgICAgICAgIHZhciBhdHRhY2htZW50ID0gYXR0YWNobWVudENhY2hlLmdldChhdHRhY2htZW50X2lkLCAnYXR0YWNobWVudCcpO1xuXG4gICAgICAgICAgICAgICAgZmllbGQuY29udGVudCArPSAnPGltZyBzcmM9XCInICsgYXR0YWNobWVudC51cmwgKyAnXCIgYWx0PVwiJyArIGF0dGFjaG1lbnQuYWx0ICsgJ1wiIHRpdGxlPVwiJyArIGF0dGFjaG1lbnQudGl0bGUgKyAnXCI+JztcblxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBmaWVsZDtcbiAgICB9KTtcblxuICAgIGF0dGFjaG1lbnRDYWNoZS5yZWZyZXNoKGF0dGFjaG1lbnRfaWRzKTtcblx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HQgKyAnXCIgdGl0bGU9XCInICsgYXR0YWNobWVudC50aXRsZSArICdcIj4nO1xuXG4gICAgICAgIH1cblxuXG4gICAgICAgIHJldHVybiBmaWVsZDtcbiAgICB9KTtcblxuICAgIGF0dGFjaG1lbnRDYWNoZS5yZWZyZXNoKGF0dGFjaG1lbnRfaWRzKTtcblxuICAgIHJldHVybiBmaWVsZHM7XG5cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gU2NyYXBlcjsiLCJ2YXIgc2NyYXBlcnMgPSByZXF1aXJlKCBcIi4vLi4vc2NyYXBlci1zdG9yZS5qc1wiICk7XG5cbnZhciBTY3JhcGVyID0gZnVuY3Rpb24oKSB7fTtcblxuU2NyYXBlci5wcm90b3R5cGUuc2NyYXBlID0gZnVuY3Rpb24oZmllbGRzKXtcblxuICAgIHZhciB0aGF0ID0gdGhpcztcblxuICAgIGZpZWxkcyA9IF8ubWFwKGZpZWxkcywgZnVuY3Rpb24oZmllbGQpe1xuXG4gICAgICAgIGlmKGZpZWxkLnR5cGUgIT09ICd0YXhvbm9teScpe1xuICAgICAgICAgICAgcmV0dXJuIGZpZWxkO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHRlcm1zID0gW107XG5cbiAgICAgICAgaWYoIGZpZWxkLiRlbC5maW5kKCcuYWNmLXRheG9ub215LWZpZWxkW2RhdGEtdHlwZT1cIm11bHRpX3NlbGVjdFwiXScpLmxlbmd0aCA+IDAgKXtcblxuICAgICAgICAgICAgdGVybXMgPSBfLnBsdWNrKFxuICAgICAgICAgICAgICAgIGZpZWxkLiRlbC5maW5kKCcuYWNmLXRheG9ub215LWZpZWxkW2RhdGEtdHlwZT1cIm11bHRpX3NlbGVjdFwiXSBzZWxlY3QnKVxuICAgICAgICAgICAgICAgICAgICAuc2VsZWN0MignZGF0YScpXG4gICAgICAgICAgICAgICAgLCAndGV4dCdcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgfWVsc2UgaWYoIGZpZWxkLiRlbC5maW5kKCcuYWNmLXRheG9ub215LWZpZWxkW2RhdGEtdHlwZT1cImNoZWNrYm94XCJdJykubGVuZ3RoID4gMCApe1xuXG4gICAgICAgICAgICB0ZXJtcyA9IF8ucGx1Y2soXG4gICAgICAgICAgICAgICAgZmllbGQuJGVsLmZpbmQoJy5hY2YtdGF4b25vbXktZmllbGRbZGF0YS10eXBlPVwiY2hlY2tib3hcIl0gaW5wdXRbdHlwZT1cImNoZWNrYm94XCJdOmNoZWNrZWQnKVxuICAgICAgICAgICAgICAgICAgICAubmV4dCgpLFxuICAgICAgICAgICAgICAgICd0ZXh0Q29udGVudCdcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgfWVsc2UgaWYoIGZpZWxkLiRlbC5maW5kKCdpbnB1dFt0eXBlPWNoZWNrYm94XTpjaGVja2VkJykubGVuZ3RoID4gMCApe1xuXG4gICAgICAgICAgICB0ZXJtcyA9IF8ucGx1Y2soXG4gICAgICAgICAgICAgICAgZmllbGQuJGVsLmZpbmQoJ2lucHV0W3R5cGU9Y2hlY2tib3hdOmNoZWNrZWQnKVxuICAgICAgICAgICAgICAgICAgICAucGFyZW50KCksXG4gICAgICAgICAgICAgICAgJ3RleHRDb250ZW50J1xuICAgICAgICAgICAgKTtcblxuICAgICAgICB9ZWxzZSBpZiggZmllbGQuJGVsLmZpbmQoJ3NlbGVjdCBvcHRpb246Y2hlY2tlZCcpLmxlbmd0aCA+IDAgKXtcblxuICAgICAgICAgICAgdGVybXMgPSBfLnBsdWNrKFxuICAgICAgICAgICAgICAgIGZpZWxkLiRlbC5maW5kKCdzZWxlY3Qgb3B0aW9uOmNoZWNrZWQnKSxcbiAgICAgICAgICAgICAgICAndGV4dENvbnRlbnQnXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIH1cblxuICAgICAgICB0ZXJtcyA9IF8ubWFwKCB0ZXJtcywgZnVuY3Rpb24odGVybSl7IHJldHVybiB0ZXJtLnRyaW0oKTsgfSApO1xuXG4gICAgICAgIGlmKHRlcm1zLm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8XG4gICAgICAgIHR5cGVvZiB0aW55TUNFLmVkaXRvcnMgPT09ICd1bmRlZmluZWQnIHx8XG4gICAgICAgIHRpbnlNQ0UuZWRpdG9ycy5sZW5ndGggPT09IDAgfHxcbiAgICAgICAgdGlueU1DRS5nZXQoIGVkaXRvcklEICkgPT09IG51bGwgfHxcbiAgICAgICAgdGlueU1DRS5nZXQoIGVkaXRvcklEICkuaXNIaWRkZW4oKSApIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBTY3JhcGVyOyJdfQ== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source map shouldn't be included. Can you rebuild the file?
@kraftner this is fixed now |
Thanks. This seems to fix the issue - but also breaks it for ACF<5.6 where everything was working fine. So it seems as if this error only appears in ACF>5.6 due to the switch from select2 v3 to v4. I think we should move this back to #26 for now to first discuss if we just say we only support ACF>5.6 or make a fix that works with both versions. |
I am sorry but I'm closing this in favour of #45 which works with all versions of ACF5. Thanks for your work anyway as it pointed me in the right direction! |
This fixes #26