mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix lint errors in editor hooks
This commit is contained in:
		@@ -87,7 +87,7 @@ RED.hooks = (function() {
 | 
			
		||||
        }
 | 
			
		||||
        function callNextHook(err) {
 | 
			
		||||
            if (!hookItem || err) {
 | 
			
		||||
                if (done) { done(err) };
 | 
			
		||||
                if (done) { done(err) }
 | 
			
		||||
                return err;
 | 
			
		||||
            }
 | 
			
		||||
            if (hookItem.removed) {
 | 
			
		||||
@@ -100,15 +100,15 @@ RED.hooks = (function() {
 | 
			
		||||
                    let result = callback(payload);
 | 
			
		||||
                    if (result === false) {
 | 
			
		||||
                        // Halting the flow
 | 
			
		||||
                        if (done) { done(false) };
 | 
			
		||||
                        if (done) { done(false) }
 | 
			
		||||
                        return result;
 | 
			
		||||
                    }
 | 
			
		||||
                    hookItem = hookItem.nextHook;
 | 
			
		||||
                    return callNextHook();
 | 
			
		||||
                } catch(err) {
 | 
			
		||||
                    console.warn(err);
 | 
			
		||||
                    if (done) { done(err);}
 | 
			
		||||
                    return err;
 | 
			
		||||
                } catch(e) {
 | 
			
		||||
                    console.warn(e);
 | 
			
		||||
                    if (done) { done(e);}
 | 
			
		||||
                    return e;
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                // There is a done callback
 | 
			
		||||
@@ -118,13 +118,13 @@ RED.hooks = (function() {
 | 
			
		||||
                            hookItem = hookItem.nextHook;
 | 
			
		||||
                            callNextHook();
 | 
			
		||||
                        } else {
 | 
			
		||||
                            if (done) { done(result)};
 | 
			
		||||
                            if (done) { done(result)}
 | 
			
		||||
                        }
 | 
			
		||||
                    })
 | 
			
		||||
                } catch(err) {
 | 
			
		||||
                    console.warn(err);
 | 
			
		||||
                    if (done) { done(err) };
 | 
			
		||||
                    return err;
 | 
			
		||||
                } catch(e) {
 | 
			
		||||
                    console.warn(e);
 | 
			
		||||
                    if (done) { done(e) }
 | 
			
		||||
                    return e;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user