MCPcopy Create free account
hub / github.com/DanWahlin/CustomerManagerStandard / addContext

Function addContext

CustomerManager/Scripts/breeze.debug.js:923–942  ·  view source on GitHub ↗
(that, context)

Source from the content-addressed store, hash-verified

921 };
922
923 function addContext(that, context) {
924 if (that._context) {
925 var curContext = that._context;
926
927 while (curContext.prevContext != null) {
928 curContext = curContext.prevContext;
929 }
930
931 if (curContext.prevContext === null) {
932 curContext.prevContext = context;
933 // just update the prevContext but don't change the curContext.
934 return that;
935 } else if (context.prevContext == null) {
936 context.prevContext = that._context;
937 } else {
938 throw new Error("Illegal construction - use 'or' to combine checks");
939 }
940 }
941 return setContext(that, context);
942 }
943
944 function setContext(that, context) {
945 that._contexts[that._contexts.length - 1] = context;

Callers 1

breeze.debug.jsFile · 0.85

Calls 1

setContextFunction · 0.85

Tested by

no test coverage detected