(function () {
    'use strict';

    angular
        .module('atlas')
        .factory('reducer', reducerFactory);

    reducerFactory.$inject = [
        'urlReducers',
        'detailReducers',
        'homeReducers',
        'layerSelectionReducers',
        'mapReducers',
        'pageReducers',
        'searchReducers',
        'straatbeeldReducers',
        'dataSelectionReducers',
        'printReducers'
    ];

    function reducerFactory (urlReducers,
                             detailReducers,
                             homeReducers,
                             layerSelectionReducers,
                             mapReducers,
                             pageReducers,
                             searchReducers,
                             straatbeeldReducers,
                             dataSelectionReducers,
                             printReducers) {
        let actions;

        return reduce;

        function mergeReducers () {
            return angular.merge(
                urlReducers,
                detailReducers,
                homeReducers,
                layerSelectionReducers,
                mapReducers,
                pageReducers,
                searchReducers,
                straatbeeldReducers,
                dataSelectionReducers,
                printReducers
            );
        }

        function reduce (oldState, action) {
            if (angular.isUndefined(actions)) {
                actions = mergeReducers();
            }

            if (angular.isObject(action) &&
                angular.isObject(action.type) &&
                angular.isFunction(actions[action.type.id])) {
                return actions[action.type.id](oldState, action.payload);
            } else {
                return oldState;
            }
        }
    }
})();

@@ -890,78 +890,41 @@
     
-let actions;%0A%0A        return reduce;%0A%0A        function mergeReducers (
+return function (oldState, action
 ) %7B%0A
@@ -935,22 +935,29 @@
         
-return
+var actions =
  angular
@@ -1310,169 +1310,8 @@
   );
-%0A        %7D%0A%0A        function reduce (oldState, action) %7B%0A            if (angular.isUndefined(actions)) %7B%0A                actions = mergeReducers();%0A            %7D
 %0A%0A  
@@ -1602,24 +1602,24 @@
           %7D%0A
-
         %7D%0A  
@@ -1611,24 +1611,25 @@
  %7D%0A        %7D
+;
 %0A    %7D%0A%7D)();

Reset reducer factory back to original version