mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Support at sign in module examples path for flows endpoint
This commit allows an example from an npm package that has an org scoped name (which includes an @ character) to be retrieved and loaded properly through the flows endpoint.
This commit is contained in:
@@ -95,7 +95,7 @@ module.exports = {
|
||||
},
|
||||
get: function(req,res) {
|
||||
if (req.params[0].indexOf("_examples_/") === 0) {
|
||||
var m = /^_examples_\/([^\/]+)\/(.*)$/.exec(req.params[0]);
|
||||
var m = /^_examples_\/(@.*?\/[^\/]+|[^\/]+)\/(.*)$/.exec(req.params[0]);
|
||||
if (m) {
|
||||
var module = m[1];
|
||||
var path = m[2];
|
||||
|
Reference in New Issue
Block a user