Skip to content

Commit

Permalink
Unglobal safeApply
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Apr 9, 2024
1 parent 466a4c4 commit 4ff1f24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -16,6 +16,7 @@
- `ParallelCorpusListing`
- `regescape`
- `unregescape`
- `safeApply`
- Renamed localization functions (just like the template filters):
- `getLocaleString` to `loc`
- `getLocaleStringObject` to `locObj`
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/components/sidebar.js
Expand Up @@ -5,7 +5,7 @@ import "../../styles/sidebar.scss"
import statemachine from "../statemachine"
import settings from "@/settings"
import { stringify } from "@/stringify.js"
import { html, loc, regescape, splitLemgram, locAttribute } from "@/util"
import { html, loc, regescape, splitLemgram, locAttribute, safeApply } from "@/util"
import "@/components/deptree/deptree"

let sidebarComponents = {}
Expand Down
1 change: 1 addition & 0 deletions app/scripts/newsdesk.js
Expand Up @@ -3,6 +3,7 @@
// Requirements: JQuery, JQuery.ui.position, trust filter, loc filter, Font Awesome
import _ from "lodash"
import settings from "@/settings"
import { safeApply } from "@/util"

angular.module("newsdesk", []).directive("newsDesk", [
"$rootElement",
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/util.js
Expand Up @@ -24,7 +24,7 @@ export function angularLocationSearch(...args) {
/** @deprecated */
window.locationSearch = angularLocationSearch

window.safeApply = function (scope, fn) {
export function safeApply(scope, fn) {
if (scope.$$phase || scope.$root.$$phase) {
return fn(scope)
} else {
Expand Down

0 comments on commit 4ff1f24

Please sign in to comment.