Skip to content

Commit

Permalink
Merge pull request #1187 from ricekot/update-alert-generator-script
Browse files Browse the repository at this point in the history
Update generate_alert_pages.js script
  • Loading branch information
thc202 authored Jul 2, 2024
2 parents 655e501 + b45111b commit 671d703
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/generate_alert_pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ function getPrivateMethod(obj, methods, key, defaultVal) {
function printPscanRule(plugin) {
plugin.setHelper(passiveScanData);

var examples = getPrivateMethod(plugin, ['getExampleAlerts'], '', null);
try {
var examples = plugin.getExampleAlerts()
} catch (e) {
var examples = getPrivateMethod(plugin, ['getExampleAlerts'], '', null);
}

if (examples == null || examples.length == 0) {
var alert = new Alert(plugin.getPluginId());
Expand Down

0 comments on commit 671d703

Please sign in to comment.