Commit 8207d347 authored by Aron Carroll's avatar Aron Carroll

Reorder variable assignment in setupAndLoadAnnotations

parent 732bc59d
......@@ -29,6 +29,7 @@ class AnnotationMapperService
# From Annotator core.
setupAndLoadAnnotations = (annotations) =>
clone = annotations.slice()
loader = (annList=[]) =>
now = annList.splice(0,10)
......@@ -42,13 +43,10 @@ class AnnotationMapperService
else
$rootScope.$emit('annotationsLoaded', clone)
clone = annotations.slice()
if annotations.length # Do we have to do something?
setTimeout -> loader(annotations)
else # no pending scan
# We can start parsing them right away
loader(annotations)
this
setTimeout -> loader(annotations)
else # no pending scan
# We can start parsing them right away
loader(annotations)
angular.module('h').service('annotationMapper', AnnotationMapperService)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment